Date   

Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception #bluetoothmesh

vikrant8051 <vikrant8051@...>
 

Hi,

These are today's OOPS & Faults

root@vikrant-iMac:/home/vikrant/projects/bluez/mesh# /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1a7c4
==>  /home/vikrant/projects/zephyr/zephyr/include/net/buf.h:370

root@vikrant-iMac:/home/vikrant/projects/bluez/mesh# /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1a550
==> /home/vikrant/projects/zephyr/zephyr/subsys/net/buf.c:60

root@vikrant-iMac:/home/vikrant/projects/bluez/mesh# /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x6e46
==> /home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/host/conn.c:1354

/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x4ea8
==> /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/include/generated/syscalls/kernel.h:99

Thank You !!

On Wed, May 30, 2018 at 7:30 PM, Cufi, Carles <Carles.Cufi@...> wrote:

This is starting to look more and more like a memory corruption or kernel issue at this point.

I cannot reproduce this easily by running our standard Bluetooth samples, so I am a bit at a loss here. I will try to run a mesh sample to see if it fails in the same way.

 

From: Vikrant More <vikrant8051@...>
Sent: 30 May 2018 13:05
To: Cufi, Carles <carles.cufi@...>
Cc: Von Dentz, Luiz <luiz.von.dentz@...>; Johan Hedberg <johan.hedberg@...>; devel@...; users@...
Subject: Re: [Zephyr-devel] [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi to all,

 

Suddenly get this non-stoppable FAULT

 

***** BUS FAULT *****
  Executing thread ID (thread): 0x20000220
  Faulting instruction address:  0x1c9a4
  Precise data bus error
  Address: 0xe5f7ffbe
Fatal fault in thread 0x20000220! Aborting.

 

Input -->

 

#/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1c9a4

 

Output -->

 

/home/vikrant/projects/zephyr/zephyr/kernel/include/ksched.h:153

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Thank You !!

 

 

 

 

 

On Wed, May 30, 2018 at 4:20 PM, vikrant8051 <vikrant8051@...> wrote:

Hi Carles,

 

Now get these FAULT/OOPS,

 

***** MPU FAULT *****

  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Instruction Access Violation
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** Kernel OOPS! *****
Current thread ID = 0x20001eb0
Faulting instruction address = 0x14f10

Fatal fault in ISR! Spinning...

 

 

 

Input -->

 

#/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x14f10

 

Output -->

 

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c:4702

 

 

Thanks !!

 

 

On Wed, May 30, 2018 at 4:11 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Thanks for looking into this. It seems like we do not get a buffer back from the command tx queue: https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/host/hci_core.c#L3318

 

I have copied Luiz and Johan from Intel in case they know what the cause might be.

 

Regards,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 12:31


To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

Input ->

/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x5222

 

Output ->

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/host/hci_core.c:3318

 

Thank You !!

 

On Wed, May 30, 2018 at 3:51 PM, Cufi, Carles <Carles.Cufi@...> wrote:

If you are using the Zephyr SDK:

 

path-to-zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e zephyr.elf <addr>

 

Carles

 

 

From: Vikrant More <vikrant8051@...>
Sent: 30 May 2018 12:11
To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

I will but don't know, how to do that ?

 

 

On Wed, May 30, 2018 at 3:19 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Can you please run addr2line with this address present in the error log: 0x5222?

 

Thanks,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 11:29
To: devel@...; users@...
Subject: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hello World !!

 

Today after upgrading to v1.12.0-rc2, I'm getting following error while playing with sample code which is inspired from sample/bluetooth/mesh

 

 

[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [ERR] event_scan_prepare: assert: '!_radio.ticker_id_prepare' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x1b77e
Fatal fault in ISR! Spinning...

 

-------------------------------------------------------------------------------------------------------------------------

 

Sometime it completely hangs & nothing get displayed on debug terminal

 

-------------------------------------------------------------------------------------------------------------------------

 

Thank You !!

 

 

 

 

 

 

 

 

 



Re: [Zephyr-users] [Zephyr-devel] cmake -DBOARD=nrf52840_pca10056 .. gives me ERROR

vikrant8051 <vikrant8051@...>
 

Hi,
I re-downloaded entire git repository & now it works for me !!

On Thu, May 31, 2018 at 7:07 PM, vikrant8051 <vikrant8051@...> wrote:
Hi,
But I'm facing this error just after updating to latest version of zephyr which I did just an half hour ago.

Thank You !!

On Thu, May 31, 2018 at 7:02 PM, Bøe, Sebastian <Sebastian.Boe@...> wrote:
https://stackoverflow.com/questions/47081317/zephyr-cmake-error
________________________________________
From: devel@... <devel@...> on behalf of vikrant8051 <vikrant8051@...>
Sent: Thursday, 31 May 2018 3:20:09 PM
To: devel@...; users@...
Subject: [Zephyr-devel] cmake -DBOARD=nrf52840_pca10056 .. gives me ERROR

Hi,

After executing,
cmake -DBOARD=nrf52840_pca10056 ..

I got following error ...
(tried it with samples/bluetooth/mesh as well as samples/basic/blink_led/build)
-------------------------------------------------------------------------------------------------------------------------

CMake Error at CMakeLists.txt:1 (include):
  include could not find load file:

    /cmake/app/boilerplate.cmake


-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:4 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.5)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "/home/vikrant/projects/zephyr/zephyr/samples/basic/blink_led/build/CMakeFiles/CMakeOutput.log".


Thank You !!




Re: cmake -DBOARD=nrf52840_pca10056 .. gives me ERROR

vikrant8051 <vikrant8051@...>
 

Hi,
But I'm facing this error just after updating to latest version of zephyr which I did just an half hour ago.

Thank You !!

On Thu, May 31, 2018 at 7:02 PM, Bøe, Sebastian <Sebastian.Boe@...> wrote:
https://stackoverflow.com/questions/47081317/zephyr-cmake-error
________________________________________
From: devel@... <devel@...> on behalf of vikrant8051 <vikrant8051@...>
Sent: Thursday, 31 May 2018 3:20:09 PM
To: devel@...; users@...
Subject: [Zephyr-devel] cmake -DBOARD=nrf52840_pca10056 .. gives me ERROR

Hi,

After executing,
cmake -DBOARD=nrf52840_pca10056 ..

I got following error ...
(tried it with samples/bluetooth/mesh as well as samples/basic/blink_led/build)
-------------------------------------------------------------------------------------------------------------------------

CMake Error at CMakeLists.txt:1 (include):
  include could not find load file:

    /cmake/app/boilerplate.cmake


-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:4 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.5)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "/home/vikrant/projects/zephyr/zephyr/samples/basic/blink_led/build/CMakeFiles/CMakeOutput.log".


Thank You !!



Re: cmake -DBOARD=nrf52840_pca10056 .. gives me ERROR

Sebastian Boe
 

https://stackoverflow.com/questions/47081317/zephyr-cmake-error
________________________________________
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> on behalf of vikrant8051 <vikrant8051@gmail.com>
Sent: Thursday, 31 May 2018 3:20:09 PM
To: devel@lists.zephyrproject.org; users@lists.zephyrproject.org
Subject: [Zephyr-devel] cmake -DBOARD=nrf52840_pca10056 .. gives me ERROR

Hi,

After executing,
cmake -DBOARD=nrf52840_pca10056 ..

I got following error ...
(tried it with samples/bluetooth/mesh as well as samples/basic/blink_led/build)
-------------------------------------------------------------------------------------------------------------------------

CMake Error at CMakeLists.txt:1 (include):
include could not find load file:

/cmake/app/boilerplate.cmake


-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:4 (target_sources):
Cannot specify sources for target "app" which is not built by this project.


CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 3.5)

should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "/home/vikrant/projects/zephyr/zephyr/samples/basic/blink_led/build/CMakeFiles/CMakeOutput.log".


Thank You !!


cmake -DBOARD=nrf52840_pca10056 .. gives me ERROR

vikrant8051 <vikrant8051@...>
 

Hi,

After executing,
cmake -DBOARD=nrf52840_pca10056 ..

I got following error ...
(tried it with samples/bluetooth/mesh as well as samples/basic/blink_led/build)
-------------------------------------------------------------------------------------------------------------------------

CMake Error at CMakeLists.txt:1 (include):
  include could not find load file:

    /cmake/app/boilerplate.cmake


-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:4 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.5)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "/home/vikrant/projects/zephyr/zephyr/samples/basic/blink_led/build/CMakeFiles/CMakeOutput.log".


Thank You !!


Re: How to support multiple defconfigs to be merged?

Carles Cufi
 

Oh, didn't realize. Sorry for the noise.

-----Original Message-----
From: Bøe, Sebastian
Sent: 31 May 2018 10:57
To: Cufi, Carles <carles.cufi@nordicsemi.no>; Michael Rosen
<michael.r.rosen@intel.com>; Li, Jun R <jun.r.li@intel.com>;
devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Already done.

https://github.com/zephyrproject-rtos/zephyr/pull/8034
________________________________________
From: Cufi, Carles
Sent: Thursday, 31 May 2018 10:54:43 AM
To: Bøe, Sebastian; Michael Rosen; Li, Jun R;
devel@lists.zephyrproject.org
Subject: RE: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Hi Mike,

Do you mind sending a Pull Request for this change?

Thanks,

Carles

-----Original Message-----
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> On
Behalf Of Sebastian Boe
Sent: 31 May 2018 10:15
To: Michael Rosen <michael.r.rosen@intel.com>; Li, Jun R
<jun.r.li@intel.com>; devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Ah, I did not realize that this would make both formats work.
Then this change is very welcome.

________________________________________
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> on
behalf of Michael Rosen <michael.r.rosen@intel.com>
Sent: Wednesday, 30 May 2018 6:55:46 PM
To: Bøe, Sebastian; Li, Jun R; devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Sebastian,

As the line I suggested changing just does a replace of space with
semicolon, either "a b c" or "a;b;c" should work (and any combo should
work too, like "a b;c". The reason I suggest we look at doing the fix
I suggested is that CONF_FILE must then be handled all on one line,
which might limit modularity in larger projects, unless you just move
it from a temporary variable over to CONF_FILE later, like

set(TMP "a")
list(APPEND TMP "b")

set(CONF_FILE "${TMP}")

Also, with this change, the old method of just using a space separated
list will still work fine.

Mike

-----Original Message-----
From: devel@lists.zephyrproject.org
[mailto:devel@lists.zephyrproject.org]
On Behalf Of Sebastian Boe
Sent: Wednesday, May 30, 2018 1:23 AM
To: Li, Jun R <jun.r.li@intel.com>; Rosen, Michael R
<michael.r.rosen@intel.com>; devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

CONF_FILE is a space-separated list instead of the normal CMake
semicolon- separated list.

So doing

set(CONF_FILE "defconfig_1 defconfig_2 defconfig_3")

is expected to work without any upstream modifications.

I can't remember the reason it was decided to be space-separated.

It could have been to support the user specifying

cmake -DCONF_FILE="a b c"

instead of

cmake -DCONF_FILE="a;b;c"

________________________________________
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org>
on behalf of Li, Jun R <jun.r.li@intel.com>
Sent: Wednesday, 30 May 2018 1:24:31 AM
To: Rosen, Michael R; devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Thank you, Mike! Yeah, it is better to have a PR in Zephyr to
support
this.

Regards,
Jun


From: <devel@lists.zephyrproject.org> on behalf of Michael Rosen
<michael.r.rosen@intel.com>
Date: Tuesday, May 29, 2018 at 16:12
To: Jun Li <jun.r.li@intel.com>, "devel@lists.zephyrproject.org"
<devel@lists.zephyrproject.org>
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Jun,

As we discussed, you can use the following to do what you have below
in the new cmake system:

set(CONF_FILE "defconfig_1")
list(APPEND CONF_FILE "defconfig_2") list(APPEND CONF_FILE
"defconfig_3")

However, you need to update cmake/kconfig.cmake:13 to be:

string(REPLACE " " ";" CONF_FILE_AS_LIST "${CONF_FILE}")

ie, add quotes to CONF_FILE. Unless the Zephyr team has another
suggestion for how to achieve multiple defconfig files; it might be
good to add these quotes to the actual release (I can make a pull
request if this is the suggestions approach)

Mike

From: devel@lists.zephyrproject.org
[mailto:devel@lists.zephyrproject.org]
On Behalf Of Li, Jun R
Sent: Tuesday, May 29, 2018 2:22 PM
To: devel@lists.zephyrproject.org
Subject: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Hi everyone,

Before Zephyr adopted cmake as the building tool, it supported to
merge multiple defconfig files in project's makefile by the
following
way:

CONF_FILE = defconfig_1
CONF_FILE += defconfig_2
CONF_FILE += defconfig_3

The three "defconfig_x" files will be merged together when being
built.

However, in the current version with CMake, only one defconfig is
acceptable by the following way in the project's CMakeLists.txt:

set(CONF_FILE defconfig_1)

Other "set" operations on "CONF_FILE" will make previous ones to be
ignored, meaning only the last "set(CONF_FILE defconfig_x)" works.

So, is there still a way to merge multiple defconfigs by using
CMake?

Thank you!

Jun Li









Re: flash testing app(soc_flash_nrf5) fails to complete when using segger RTT.

Carles Cufi
 

-----Original Message-----
From: Abderrezak Mekkaoui <ab.mekka@clevertsystems.com>
Sent: 30 May 2018 19:08
To: Cufi, Carles <carles.cufi@nordicsemi.no>;
devel@lists.zephyrproject.org; Chruściński, Krzysztof
<Krzysztof.Chruscinski@nordicsemi.no>; Puzdrowski, Andrzej
<Andrzej.Puzdrowski@nordicsemi.no>
Subject: Re: [Zephyr-devel] flash testing app(soc_flash_nrf5) fails to
complete when using segger RTT.

Thanks  Carles, it worked.


On 5/30/2018 12:25 PM, Cufi, Carles wrote:
Hi there,

I played around a little bit more and I believe I found the issue.
We have a 1KB buffer for the FIFO that RTT uses, and this sample
actually manages to fill it faster than the debugger can empty it. What
I think we should do is to block instead of dropping data when the FIFO
is full.

Can you please try the patch below to see if it solves your issue? We
can then send a pull request.

diff --git a/ext/debug/segger/rtt/SEGGER_RTT_Conf.h
b/ext/debug/segger/rtt/SEGGER_RTT_Conf.h
index db6952834..6d21c732e 100755
--- a/ext/debug/segger/rtt/SEGGER_RTT_Conf.h
+++ b/ext/debug/segger/rtt/SEGGER_RTT_Conf.h
@@ -86,7 +86,7 @@ Revision: $Rev: 4351 $

#define SEGGER_RTT_PRINTF_BUFFER_SIZE (64u) // Size
of buffer for RTT printf to bulk-send chars via RTT (Default: 64)

-#define SEGGER_RTT_MODE_DEFAULT
SEGGER_RTT_MODE_NO_BLOCK_SKIP // Mode for pre-initialized terminal
channel (buffer 0)
+#define SEGGER_RTT_MODE_DEFAULT
SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL // Mode for pre-initialized terminal
channel (buffer 0)

//
// Target is not allowed to perform other RTT operations while
string still has not been stored completely.

Carles

-----Original Message-----
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org>
On Behalf Of Cufi, Carles
Sent: 30 May 2018 17:53
To: Cufi, Carles <carles.cufi@nordicsemi.no>; Abderrezak Mekkaoui
<ab.mekka@clevertsystems.com>; devel@lists.zephyrproject.org;
Chruściński, Krzysztof <Krzysztof.Chruscinski@nordicsemi.no>;
Puzdrowski, Andrzej <Andrzej.Puzdrowski@nordicsemi.no>
Subject: Re: [Zephyr-devel] flash testing app(soc_flash_nrf5) fails
to complete when using segger RTT.

I actually combined RTT and UART output to be able to debug this
better, and it turns out that the program is not hanging, it does
reach the end of main(), it's just that the RTT log output is not
coming out, for whatever the reason.

Carles

-----Original Message-----
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org>
On Behalf Of Cufi, Carles
Sent: 30 May 2018 17:08
To: Abderrezak Mekkaoui <ab.mekka@clevertsystems.com>;
devel@lists.zephyrproject.org; Chruściński, Krzysztof
<Krzysztof.Chruscinski@nordicsemi.no>; Puzdrowski, Andrzej
<Andrzej.Puzdrowski@nordicsemi.no>
Subject: Re: [Zephyr-devel] flash testing app(soc_flash_nrf5) fails
to complete when using segger RTT.

Hi Adberrezak,

I can reproduce the same issue here locally. I am copying Krzysztof
and Andrzej to let them know, it might be that RTT has an issue with
flash writes.

Regards,

Carles

-----Original Message-----
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org>
On Behalf Of Abderrezak Mekkaoui
Sent: 30 May 2018 16:51
To: devel@lists.zephyrproject.org
Subject: [Zephyr-devel] flash testing app(soc_flash_nrf5) fails to
complete when using segger RTT.

Hi All,

When running the zephyr supplied flash test sample
(..\zephyr\samples\drivers\soc_flash_nrf5), it produces the correct
output when using the regular UART console.
But when I switch to the segger RTT it hangs before completing.
I would appreciate If you have any input on why this might be
happening.
Is there any special precaution one has to observe when using the
segger RTT?
Thank you

Abderrezak


================================================================

..\zephyr\samples\drivers\soc_flash_nrf5

Output when using the segger RTT:

***** BOOTING ZEPHYR OS v1.11.0 - BUILD: May 29 2018 21:58:25 *****

Nordic nRF5 Flash Testing
=========================

Test 1: Flash erase page at 0x40000
   Flash erase succeeded!

Test 2: Flash write (word array 1)
   Attempted to write 1122 at 0x40000
   Attempted to read 0x40000
   Data read: 1122
   Data read matches data written. Good!
   Attempted to write aabb at 0x40004
   Attempted to read 0x40004
   Data read: aabb
   Data read matches data written. Good!
   Attempted to write abcd at 0x40008
   Attempted to read 0x40008
   Data read: abcd
   Data read matches data written. Good!
   Attempted to write 1234 at 0x4000c
   Attempted to read 0x4000c
   Data read: 1234
   Data read matches data written. Good!

Test 3: Flash erase (4 pages at 0x3e000)
   Flash erase succeeded!

Test 4: Flash write (word array 2)
   Attempted to write 1234 at 0x40000
   Attempted to read 0x40000
   Data read: 1234
   Data read matches data written. Good!
   Attempted to write aabb at 0




Re: How to support multiple defconfigs to be merged?

Sebastian Boe
 

Already done.

https://github.com/zephyrproject-rtos/zephyr/pull/8034
________________________________________
From: Cufi, Carles
Sent: Thursday, 31 May 2018 10:54:43 AM
To: Bøe, Sebastian; Michael Rosen; Li, Jun R; devel@lists.zephyrproject.org
Subject: RE: [Zephyr-devel] How to support multiple defconfigs to be merged?

Hi Mike,

Do you mind sending a Pull Request for this change?

Thanks,

Carles

-----Original Message-----
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> On
Behalf Of Sebastian Boe
Sent: 31 May 2018 10:15
To: Michael Rosen <michael.r.rosen@intel.com>; Li, Jun R
<jun.r.li@intel.com>; devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Ah, I did not realize that this would make both formats work.
Then this change is very welcome.

________________________________________
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> on
behalf of Michael Rosen <michael.r.rosen@intel.com>
Sent: Wednesday, 30 May 2018 6:55:46 PM
To: Bøe, Sebastian; Li, Jun R; devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Sebastian,

As the line I suggested changing just does a replace of space with
semicolon, either "a b c" or "a;b;c" should work (and any combo should
work too, like "a b;c". The reason I suggest we look at doing the fix I
suggested is that CONF_FILE must then be handled all on one line, which
might limit modularity in larger projects, unless you just move it from
a temporary variable over to CONF_FILE later, like

set(TMP "a")
list(APPEND TMP "b")

set(CONF_FILE "${TMP}")

Also, with this change, the old method of just using a space separated
list will still work fine.

Mike

-----Original Message-----
From: devel@lists.zephyrproject.org
[mailto:devel@lists.zephyrproject.org]
On Behalf Of Sebastian Boe
Sent: Wednesday, May 30, 2018 1:23 AM
To: Li, Jun R <jun.r.li@intel.com>; Rosen, Michael R
<michael.r.rosen@intel.com>; devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

CONF_FILE is a space-separated list instead of the normal CMake
semicolon- separated list.

So doing

set(CONF_FILE "defconfig_1 defconfig_2 defconfig_3")

is expected to work without any upstream modifications.

I can't remember the reason it was decided to be space-separated.

It could have been to support the user specifying

cmake -DCONF_FILE="a b c"

instead of

cmake -DCONF_FILE="a;b;c"

________________________________________
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> on
behalf of Li, Jun R <jun.r.li@intel.com>
Sent: Wednesday, 30 May 2018 1:24:31 AM
To: Rosen, Michael R; devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Thank you, Mike! Yeah, it is better to have a PR in Zephyr to support
this.

Regards,
Jun


From: <devel@lists.zephyrproject.org> on behalf of Michael Rosen
<michael.r.rosen@intel.com>
Date: Tuesday, May 29, 2018 at 16:12
To: Jun Li <jun.r.li@intel.com>, "devel@lists.zephyrproject.org"
<devel@lists.zephyrproject.org>
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Jun,

As we discussed, you can use the following to do what you have below
in the new cmake system:

set(CONF_FILE "defconfig_1")
list(APPEND CONF_FILE "defconfig_2")
list(APPEND CONF_FILE "defconfig_3")

However, you need to update cmake/kconfig.cmake:13 to be:

string(REPLACE " " ";" CONF_FILE_AS_LIST "${CONF_FILE}")

ie, add quotes to CONF_FILE. Unless the Zephyr team has another
suggestion for how to achieve multiple defconfig files; it might be
good to add these quotes to the actual release (I can make a pull
request if this is the suggestions approach)

Mike

From: devel@lists.zephyrproject.org
[mailto:devel@lists.zephyrproject.org]
On Behalf Of Li, Jun R
Sent: Tuesday, May 29, 2018 2:22 PM
To: devel@lists.zephyrproject.org
Subject: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Hi everyone,

Before Zephyr adopted cmake as the building tool, it supported to
merge multiple defconfig files in project's makefile by the following
way:

CONF_FILE = defconfig_1
CONF_FILE += defconfig_2
CONF_FILE += defconfig_3

The three "defconfig_x" files will be merged together when being
built.

However, in the current version with CMake, only one defconfig is
acceptable by the following way in the project's CMakeLists.txt:

set(CONF_FILE defconfig_1)

Other "set" operations on "CONF_FILE" will make previous ones to be
ignored, meaning only the last "set(CONF_FILE defconfig_x)" works.

So, is there still a way to merge multiple defconfigs by using CMake?

Thank you!

Jun Li









Re: How to support multiple defconfigs to be merged?

Carles Cufi
 

Hi Mike,

Do you mind sending a Pull Request for this change?

Thanks,

Carles

-----Original Message-----
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> On
Behalf Of Sebastian Boe
Sent: 31 May 2018 10:15
To: Michael Rosen <michael.r.rosen@intel.com>; Li, Jun R
<jun.r.li@intel.com>; devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Ah, I did not realize that this would make both formats work.
Then this change is very welcome.

________________________________________
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> on
behalf of Michael Rosen <michael.r.rosen@intel.com>
Sent: Wednesday, 30 May 2018 6:55:46 PM
To: Bøe, Sebastian; Li, Jun R; devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Sebastian,

As the line I suggested changing just does a replace of space with
semicolon, either "a b c" or "a;b;c" should work (and any combo should
work too, like "a b;c". The reason I suggest we look at doing the fix I
suggested is that CONF_FILE must then be handled all on one line, which
might limit modularity in larger projects, unless you just move it from
a temporary variable over to CONF_FILE later, like

set(TMP "a")
list(APPEND TMP "b")

set(CONF_FILE "${TMP}")

Also, with this change, the old method of just using a space separated
list will still work fine.

Mike

-----Original Message-----
From: devel@lists.zephyrproject.org
[mailto:devel@lists.zephyrproject.org]
On Behalf Of Sebastian Boe
Sent: Wednesday, May 30, 2018 1:23 AM
To: Li, Jun R <jun.r.li@intel.com>; Rosen, Michael R
<michael.r.rosen@intel.com>; devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

CONF_FILE is a space-separated list instead of the normal CMake
semicolon- separated list.

So doing

set(CONF_FILE "defconfig_1 defconfig_2 defconfig_3")

is expected to work without any upstream modifications.

I can't remember the reason it was decided to be space-separated.

It could have been to support the user specifying

cmake -DCONF_FILE="a b c"

instead of

cmake -DCONF_FILE="a;b;c"

________________________________________
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> on
behalf of Li, Jun R <jun.r.li@intel.com>
Sent: Wednesday, 30 May 2018 1:24:31 AM
To: Rosen, Michael R; devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Thank you, Mike! Yeah, it is better to have a PR in Zephyr to support
this.

Regards,
Jun


From: <devel@lists.zephyrproject.org> on behalf of Michael Rosen
<michael.r.rosen@intel.com>
Date: Tuesday, May 29, 2018 at 16:12
To: Jun Li <jun.r.li@intel.com>, "devel@lists.zephyrproject.org"
<devel@lists.zephyrproject.org>
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Jun,

As we discussed, you can use the following to do what you have below
in the new cmake system:

set(CONF_FILE "defconfig_1")
list(APPEND CONF_FILE "defconfig_2")
list(APPEND CONF_FILE "defconfig_3")

However, you need to update cmake/kconfig.cmake:13 to be:

string(REPLACE " " ";" CONF_FILE_AS_LIST "${CONF_FILE}")

ie, add quotes to CONF_FILE. Unless the Zephyr team has another
suggestion for how to achieve multiple defconfig files; it might be
good to add these quotes to the actual release (I can make a pull
request if this is the suggestions approach)

Mike

From: devel@lists.zephyrproject.org
[mailto:devel@lists.zephyrproject.org]
On Behalf Of Li, Jun R
Sent: Tuesday, May 29, 2018 2:22 PM
To: devel@lists.zephyrproject.org
Subject: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Hi everyone,

Before Zephyr adopted cmake as the building tool, it supported to
merge multiple defconfig files in project's makefile by the following
way:

CONF_FILE = defconfig_1
CONF_FILE += defconfig_2
CONF_FILE += defconfig_3

The three "defconfig_x" files will be merged together when being
built.

However, in the current version with CMake, only one defconfig is
acceptable by the following way in the project's CMakeLists.txt:

set(CONF_FILE defconfig_1)

Other "set" operations on "CONF_FILE" will make previous ones to be
ignored, meaning only the last "set(CONF_FILE defconfig_x)" works.

So, is there still a way to merge multiple defconfigs by using CMake?

Thank you!

Jun Li









Re: How to support multiple defconfigs to be merged?

Sebastian Boe
 

Ah, I did not realize that this would make both formats work.
Then this change is very welcome.

________________________________________
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> on behalf of Michael Rosen <michael.r.rosen@intel.com>
Sent: Wednesday, 30 May 2018 6:55:46 PM
To: Bøe, Sebastian; Li, Jun R; devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be merged?

Sebastian,

As the line I suggested changing just does a replace of space with semicolon, either "a b c" or "a;b;c" should work (and any combo should work too, like "a b;c". The reason I suggest we look at doing the fix I suggested is that CONF_FILE must then be handled all on one line, which might limit modularity in larger projects, unless you just move it from a temporary variable over to CONF_FILE later, like

set(TMP "a")
list(APPEND TMP "b")

set(CONF_FILE "${TMP}")

Also, with this change, the old method of just using a space separated list will still work fine.

Mike

-----Original Message-----
From: devel@lists.zephyrproject.org [mailto:devel@lists.zephyrproject.org]
On Behalf Of Sebastian Boe
Sent: Wednesday, May 30, 2018 1:23 AM
To: Li, Jun R <jun.r.li@intel.com>; Rosen, Michael R
<michael.r.rosen@intel.com>; devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

CONF_FILE is a space-separated list instead of the normal CMake semicolon-
separated list.

So doing

set(CONF_FILE "defconfig_1 defconfig_2 defconfig_3")

is expected to work without any upstream modifications.

I can't remember the reason it was decided to be space-separated.

It could have been to support the user specifying

cmake -DCONF_FILE="a b c"

instead of

cmake -DCONF_FILE="a;b;c"

________________________________________
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> on
behalf of Li, Jun R <jun.r.li@intel.com>
Sent: Wednesday, 30 May 2018 1:24:31 AM
To: Rosen, Michael R; devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Thank you, Mike! Yeah, it is better to have a PR in Zephyr to support this.

Regards,
Jun


From: <devel@lists.zephyrproject.org> on behalf of Michael Rosen
<michael.r.rosen@intel.com>
Date: Tuesday, May 29, 2018 at 16:12
To: Jun Li <jun.r.li@intel.com>, "devel@lists.zephyrproject.org"
<devel@lists.zephyrproject.org>
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Jun,

As we discussed, you can use the following to do what you have below in the
new cmake system:

set(CONF_FILE "defconfig_1")
list(APPEND CONF_FILE "defconfig_2")
list(APPEND CONF_FILE "defconfig_3")

However, you need to update cmake/kconfig.cmake:13 to be:

string(REPLACE " " ";" CONF_FILE_AS_LIST "${CONF_FILE}")

ie, add quotes to CONF_FILE. Unless the Zephyr team has another
suggestion for how to achieve multiple defconfig files; it might be good to
add these quotes to the actual release (I can make a pull request if this is the
suggestions approach)

Mike

From: devel@lists.zephyrproject.org [mailto:devel@lists.zephyrproject.org]
On Behalf Of Li, Jun R
Sent: Tuesday, May 29, 2018 2:22 PM
To: devel@lists.zephyrproject.org
Subject: [Zephyr-devel] How to support multiple defconfigs to be merged?

Hi everyone,

Before Zephyr adopted cmake as the building tool, it supported to merge
multiple defconfig files in project's makefile by the following way:

CONF_FILE = defconfig_1
CONF_FILE += defconfig_2
CONF_FILE += defconfig_3

The three "defconfig_x" files will be merged together when being built.

However, in the current version with CMake, only one defconfig is
acceptable by the following way in the project's CMakeLists.txt:

set(CONF_FILE defconfig_1)

Other "set" operations on "CONF_FILE" will make previous ones to be
ignored, meaning only the last "set(CONF_FILE defconfig_x)" works.

So, is there still a way to merge multiple defconfigs by using CMake?

Thank you!

Jun Li





Re: flash testing app(soc_flash_nrf5) fails to complete when using segger RTT.

Abderrezak Mekkaoui
 

Thanks  Carles, it worked.

On 5/30/2018 12:25 PM, Cufi, Carles wrote:
Hi there,

I played around a little bit more and I believe I found the issue.
We have a 1KB buffer for the FIFO that RTT uses, and this sample actually manages to fill it faster than the debugger can empty it. What I think we should do is to block instead of dropping data when the FIFO is full.

Can you please try the patch below to see if it solves your issue? We can then send a pull request.

diff --git a/ext/debug/segger/rtt/SEGGER_RTT_Conf.h b/ext/debug/segger/rtt/SEGGER_RTT_Conf.h
index db6952834..6d21c732e 100755
--- a/ext/debug/segger/rtt/SEGGER_RTT_Conf.h
+++ b/ext/debug/segger/rtt/SEGGER_RTT_Conf.h
@@ -86,7 +86,7 @@ Revision: $Rev: 4351 $

#define SEGGER_RTT_PRINTF_BUFFER_SIZE (64u) // Size of buffer for RTT printf to bulk-send chars via RTT (Default: 64)

-#define SEGGER_RTT_MODE_DEFAULT SEGGER_RTT_MODE_NO_BLOCK_SKIP // Mode for pre-initialized terminal channel (buffer 0)
+#define SEGGER_RTT_MODE_DEFAULT SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL // Mode for pre-initialized terminal channel (buffer 0)

//
// Target is not allowed to perform other RTT operations while string still has not been stored completely.

Carles

-----Original Message-----
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> On
Behalf Of Cufi, Carles
Sent: 30 May 2018 17:53
To: Cufi, Carles <carles.cufi@nordicsemi.no>; Abderrezak Mekkaoui
<ab.mekka@clevertsystems.com>; devel@lists.zephyrproject.org;
Chruściński, Krzysztof <Krzysztof.Chruscinski@nordicsemi.no>;
Puzdrowski, Andrzej <Andrzej.Puzdrowski@nordicsemi.no>
Subject: Re: [Zephyr-devel] flash testing app(soc_flash_nrf5) fails to
complete when using segger RTT.

I actually combined RTT and UART output to be able to debug this better,
and it turns out that the program is not hanging, it does reach the end
of main(), it's just that the RTT log output is not coming out, for
whatever the reason.

Carles

-----Original Message-----
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> On
Behalf Of Cufi, Carles
Sent: 30 May 2018 17:08
To: Abderrezak Mekkaoui <ab.mekka@clevertsystems.com>;
devel@lists.zephyrproject.org; Chruściński, Krzysztof
<Krzysztof.Chruscinski@nordicsemi.no>; Puzdrowski, Andrzej
<Andrzej.Puzdrowski@nordicsemi.no>
Subject: Re: [Zephyr-devel] flash testing app(soc_flash_nrf5) fails to
complete when using segger RTT.

Hi Adberrezak,

I can reproduce the same issue here locally. I am copying Krzysztof
and Andrzej to let them know, it might be that RTT has an issue with
flash writes.

Regards,

Carles

-----Original Message-----
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org>
On Behalf Of Abderrezak Mekkaoui
Sent: 30 May 2018 16:51
To: devel@lists.zephyrproject.org
Subject: [Zephyr-devel] flash testing app(soc_flash_nrf5) fails to
complete when using segger RTT.

Hi All,

When running the zephyr supplied flash test sample
(..\zephyr\samples\drivers\soc_flash_nrf5), it produces the correct
output when using the regular UART console.
But when I switch to the segger RTT it hangs before completing.
I would appreciate If you have any input on why this might be
happening.
Is there any special precaution one has to observe when using the
segger RTT?
Thank you

Abderrezak


================================================================

..\zephyr\samples\drivers\soc_flash_nrf5

Output when using the segger RTT:

***** BOOTING ZEPHYR OS v1.11.0 - BUILD: May 29 2018 21:58:25 *****

Nordic nRF5 Flash Testing
=========================

Test 1: Flash erase page at 0x40000
   Flash erase succeeded!

Test 2: Flash write (word array 1)
   Attempted to write 1122 at 0x40000
   Attempted to read 0x40000
   Data read: 1122
   Data read matches data written. Good!
   Attempted to write aabb at 0x40004
   Attempted to read 0x40004
   Data read: aabb
   Data read matches data written. Good!
   Attempted to write abcd at 0x40008
   Attempted to read 0x40008
   Data read: abcd
   Data read matches data written. Good!
   Attempted to write 1234 at 0x4000c
   Attempted to read 0x4000c
   Data read: 1234
   Data read matches data written. Good!

Test 3: Flash erase (4 pages at 0x3e000)
   Flash erase succeeded!

Test 4: Flash write (word array 2)
   Attempted to write 1234 at 0x40000
   Attempted to read 0x40000
   Data read: 1234
   Data read matches data written. Good!
   Attempted to write aabb at 0



Re: How to support multiple defconfigs to be merged?

Michael Rosen
 

Sebastian,

As the line I suggested changing just does a replace of space with semicolon, either "a b c" or "a;b;c" should work (and any combo should work too, like "a b;c". The reason I suggest we look at doing the fix I suggested is that CONF_FILE must then be handled all on one line, which might limit modularity in larger projects, unless you just move it from a temporary variable over to CONF_FILE later, like

set(TMP "a")
list(APPEND TMP "b")

set(CONF_FILE "${TMP}")

Also, with this change, the old method of just using a space separated list will still work fine.

Mike

-----Original Message-----
From: devel@lists.zephyrproject.org [mailto:devel@lists.zephyrproject.org]
On Behalf Of Sebastian Boe
Sent: Wednesday, May 30, 2018 1:23 AM
To: Li, Jun R <jun.r.li@intel.com>; Rosen, Michael R
<michael.r.rosen@intel.com>; devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

CONF_FILE is a space-separated list instead of the normal CMake semicolon-
separated list.

So doing

set(CONF_FILE "defconfig_1 defconfig_2 defconfig_3")

is expected to work without any upstream modifications.

I can't remember the reason it was decided to be space-separated.

It could have been to support the user specifying

cmake -DCONF_FILE="a b c"

instead of

cmake -DCONF_FILE="a;b;c"

________________________________________
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> on
behalf of Li, Jun R <jun.r.li@intel.com>
Sent: Wednesday, 30 May 2018 1:24:31 AM
To: Rosen, Michael R; devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Thank you, Mike! Yeah, it is better to have a PR in Zephyr to support this.

Regards,
Jun


From: <devel@lists.zephyrproject.org> on behalf of Michael Rosen
<michael.r.rosen@intel.com>
Date: Tuesday, May 29, 2018 at 16:12
To: Jun Li <jun.r.li@intel.com>, "devel@lists.zephyrproject.org"
<devel@lists.zephyrproject.org>
Subject: Re: [Zephyr-devel] How to support multiple defconfigs to be
merged?

Jun,

As we discussed, you can use the following to do what you have below in the
new cmake system:

set(CONF_FILE "defconfig_1")
list(APPEND CONF_FILE "defconfig_2")
list(APPEND CONF_FILE "defconfig_3")

However, you need to update cmake/kconfig.cmake:13 to be:

string(REPLACE " " ";" CONF_FILE_AS_LIST "${CONF_FILE}")

ie, add quotes to CONF_FILE. Unless the Zephyr team has another
suggestion for how to achieve multiple defconfig files; it might be good to
add these quotes to the actual release (I can make a pull request if this is the
suggestions approach)

Mike

From: devel@lists.zephyrproject.org [mailto:devel@lists.zephyrproject.org]
On Behalf Of Li, Jun R
Sent: Tuesday, May 29, 2018 2:22 PM
To: devel@lists.zephyrproject.org
Subject: [Zephyr-devel] How to support multiple defconfigs to be merged?

Hi everyone,

Before Zephyr adopted cmake as the building tool, it supported to merge
multiple defconfig files in project's makefile by the following way:

CONF_FILE = defconfig_1
CONF_FILE += defconfig_2
CONF_FILE += defconfig_3

The three "defconfig_x" files will be merged together when being built.

However, in the current version with CMake, only one defconfig is
acceptable by the following way in the project's CMakeLists.txt:

set(CONF_FILE defconfig_1)

Other "set" operations on "CONF_FILE" will make previous ones to be
ignored, meaning only the last "set(CONF_FILE defconfig_x)" works.

So, is there still a way to merge multiple defconfigs by using CMake?

Thank you!

Jun Li





Re: flash testing app(soc_flash_nrf5) fails to complete when using segger RTT.

Carles Cufi
 

Hi there,

I played around a little bit more and I believe I found the issue.
We have a 1KB buffer for the FIFO that RTT uses, and this sample actually manages to fill it faster than the debugger can empty it. What I think we should do is to block instead of dropping data when the FIFO is full.

Can you please try the patch below to see if it solves your issue? We can then send a pull request.

diff --git a/ext/debug/segger/rtt/SEGGER_RTT_Conf.h b/ext/debug/segger/rtt/SEGGER_RTT_Conf.h
index db6952834..6d21c732e 100755
--- a/ext/debug/segger/rtt/SEGGER_RTT_Conf.h
+++ b/ext/debug/segger/rtt/SEGGER_RTT_Conf.h
@@ -86,7 +86,7 @@ Revision: $Rev: 4351 $

#define SEGGER_RTT_PRINTF_BUFFER_SIZE (64u) // Size of buffer for RTT printf to bulk-send chars via RTT (Default: 64)

-#define SEGGER_RTT_MODE_DEFAULT SEGGER_RTT_MODE_NO_BLOCK_SKIP // Mode for pre-initialized terminal channel (buffer 0)
+#define SEGGER_RTT_MODE_DEFAULT SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL // Mode for pre-initialized terminal channel (buffer 0)

//
// Target is not allowed to perform other RTT operations while string still has not been stored completely.

Carles

-----Original Message-----
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> On
Behalf Of Cufi, Carles
Sent: 30 May 2018 17:53
To: Cufi, Carles <carles.cufi@nordicsemi.no>; Abderrezak Mekkaoui
<ab.mekka@clevertsystems.com>; devel@lists.zephyrproject.org;
Chruściński, Krzysztof <Krzysztof.Chruscinski@nordicsemi.no>;
Puzdrowski, Andrzej <Andrzej.Puzdrowski@nordicsemi.no>
Subject: Re: [Zephyr-devel] flash testing app(soc_flash_nrf5) fails to
complete when using segger RTT.

I actually combined RTT and UART output to be able to debug this better,
and it turns out that the program is not hanging, it does reach the end
of main(), it's just that the RTT log output is not coming out, for
whatever the reason.

Carles

-----Original Message-----
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> On
Behalf Of Cufi, Carles
Sent: 30 May 2018 17:08
To: Abderrezak Mekkaoui <ab.mekka@clevertsystems.com>;
devel@lists.zephyrproject.org; Chruściński, Krzysztof
<Krzysztof.Chruscinski@nordicsemi.no>; Puzdrowski, Andrzej
<Andrzej.Puzdrowski@nordicsemi.no>
Subject: Re: [Zephyr-devel] flash testing app(soc_flash_nrf5) fails to
complete when using segger RTT.

Hi Adberrezak,

I can reproduce the same issue here locally. I am copying Krzysztof
and Andrzej to let them know, it might be that RTT has an issue with
flash writes.

Regards,

Carles

-----Original Message-----
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org>
On Behalf Of Abderrezak Mekkaoui
Sent: 30 May 2018 16:51
To: devel@lists.zephyrproject.org
Subject: [Zephyr-devel] flash testing app(soc_flash_nrf5) fails to
complete when using segger RTT.

Hi All,

When running the zephyr supplied flash test sample
(..\zephyr\samples\drivers\soc_flash_nrf5), it produces the correct
output when using the regular UART console.
But when I switch to the segger RTT it hangs before completing.
I would appreciate If you have any input on why this might be
happening.
Is there any special precaution one has to observe when using the
segger RTT?
Thank you

Abderrezak


================================================================

..\zephyr\samples\drivers\soc_flash_nrf5

Output when using the segger RTT:

***** BOOTING ZEPHYR OS v1.11.0 - BUILD: May 29 2018 21:58:25 *****

Nordic nRF5 Flash Testing
=========================

Test 1: Flash erase page at 0x40000
   Flash erase succeeded!

Test 2: Flash write (word array 1)
   Attempted to write 1122 at 0x40000
   Attempted to read 0x40000
   Data read: 1122
   Data read matches data written. Good!
   Attempted to write aabb at 0x40004
   Attempted to read 0x40004
   Data read: aabb
   Data read matches data written. Good!
   Attempted to write abcd at 0x40008
   Attempted to read 0x40008
   Data read: abcd
   Data read matches data written. Good!
   Attempted to write 1234 at 0x4000c
   Attempted to read 0x4000c
   Data read: 1234
   Data read matches data written. Good!

Test 3: Flash erase (4 pages at 0x3e000)
   Flash erase succeeded!

Test 4: Flash write (word array 2)
   Attempted to write 1234 at 0x40000
   Attempted to read 0x40000
   Data read: 1234
   Data read matches data written. Good!
   Attempted to write aabb at 0





Re: flash testing app(soc_flash_nrf5) fails to complete when using segger RTT.

Carles Cufi
 

I actually combined RTT and UART output to be able to debug this better, and it turns out that the program is not hanging, it does reach the end of main(), it's just that the RTT log output is not coming out, for whatever the reason.

Carles

-----Original Message-----
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> On
Behalf Of Cufi, Carles
Sent: 30 May 2018 17:08
To: Abderrezak Mekkaoui <ab.mekka@clevertsystems.com>;
devel@lists.zephyrproject.org; Chruściński, Krzysztof
<Krzysztof.Chruscinski@nordicsemi.no>; Puzdrowski, Andrzej
<Andrzej.Puzdrowski@nordicsemi.no>
Subject: Re: [Zephyr-devel] flash testing app(soc_flash_nrf5) fails to
complete when using segger RTT.

Hi Adberrezak,

I can reproduce the same issue here locally. I am copying Krzysztof and
Andrzej to let them know, it might be that RTT has an issue with flash
writes.

Regards,

Carles

-----Original Message-----
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> On
Behalf Of Abderrezak Mekkaoui
Sent: 30 May 2018 16:51
To: devel@lists.zephyrproject.org
Subject: [Zephyr-devel] flash testing app(soc_flash_nrf5) fails to
complete when using segger RTT.

Hi All,

When running the zephyr supplied flash test sample
(..\zephyr\samples\drivers\soc_flash_nrf5), it produces the correct
output when using the regular UART console.
But when I switch to the segger RTT it hangs before completing.
I would appreciate If you have any input on why this might be
happening.
Is there any special precaution one has to observe when using the
segger RTT?
Thank you

Abderrezak


================================================================

..\zephyr\samples\drivers\soc_flash_nrf5

Output when using the segger RTT:

***** BOOTING ZEPHYR OS v1.11.0 - BUILD: May 29 2018 21:58:25 *****

Nordic nRF5 Flash Testing
=========================

Test 1: Flash erase page at 0x40000
   Flash erase succeeded!

Test 2: Flash write (word array 1)
   Attempted to write 1122 at 0x40000
   Attempted to read 0x40000
   Data read: 1122
   Data read matches data written. Good!
   Attempted to write aabb at 0x40004
   Attempted to read 0x40004
   Data read: aabb
   Data read matches data written. Good!
   Attempted to write abcd at 0x40008
   Attempted to read 0x40008
   Data read: abcd
   Data read matches data written. Good!
   Attempted to write 1234 at 0x4000c
   Attempted to read 0x4000c
   Data read: 1234
   Data read matches data written. Good!

Test 3: Flash erase (4 pages at 0x3e000)
   Flash erase succeeded!

Test 4: Flash write (word array 2)
   Attempted to write 1234 at 0x40000
   Attempted to read 0x40000
   Data read: 1234
   Data read matches data written. Good!
   Attempted to write aabb at 0




Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception #bluetoothmesh

Boie, Andrew P
 

What board is this on? Check for stack overflow, on devices with NXP MPUs these get reported as bus faults.

 

Andrew

 

From: users@... [mailto:users@...] On Behalf Of Cufi, Carles
Sent: Wednesday, May 30, 2018 7:00 AM
To: Vikrant More <vikrant8051@...>
Cc: Von Dentz, Luiz <luiz.von.dentz@...>; Hedberg, Johan <johan.hedberg@...>; devel@...; users@...
Subject: Re: [Zephyr-devel] [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

This is starting to look more and more like a memory corruption or kernel issue at this point.

I cannot reproduce this easily by running our standard Bluetooth samples, so I am a bit at a loss here. I will try to run a mesh sample to see if it fails in the same way.

 

From: Vikrant More <vikrant8051@...>
Sent: 30 May 2018 13:05
To: Cufi, Carles <carles.cufi@...>
Cc: Von Dentz, Luiz <luiz.von.dentz@...>; Johan Hedberg <johan.hedberg@...>; devel@...; users@...
Subject: Re: [Zephyr-devel] [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi to all,

 

Suddenly get this non-stoppable FAULT

 

***** BUS FAULT *****
  Executing thread ID (thread): 0x20000220
  Faulting instruction address:  0x1c9a4
  Precise data bus error
  Address: 0xe5f7ffbe
Fatal fault in thread 0x20000220! Aborting.

 

Input -->

 

#/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1c9a4

 

Output -->

 

/home/vikrant/projects/zephyr/zephyr/kernel/include/ksched.h:153

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Thank You !!

 

 

 

 

 

On Wed, May 30, 2018 at 4:20 PM, vikrant8051 <vikrant8051@...> wrote:

Hi Carles,

 

Now get these FAULT/OOPS,

 

***** MPU FAULT *****

  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Instruction Access Violation
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** Kernel OOPS! *****
Current thread ID = 0x20001eb0
Faulting instruction address = 0x14f10

Fatal fault in ISR! Spinning...

 

 

 

Input -->

 

#/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x14f10

 

Output -->

 

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c:4702

 

 

Thanks !!

 

 

On Wed, May 30, 2018 at 4:11 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Thanks for looking into this. It seems like we do not get a buffer back from the command tx queue: https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/host/hci_core.c#L3318

 

I have copied Luiz and Johan from Intel in case they know what the cause might be.

 

Regards,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 12:31


To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

Input ->

/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x5222

 

Output ->

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/host/hci_core.c:3318

 

Thank You !!

 

On Wed, May 30, 2018 at 3:51 PM, Cufi, Carles <Carles.Cufi@...> wrote:

If you are using the Zephyr SDK:

 

path-to-zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e zephyr.elf <addr>

 

Carles

 

 

From: Vikrant More <vikrant8051@...>
Sent: 30 May 2018 12:11
To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

I will but don't know, how to do that ?

 

 

On Wed, May 30, 2018 at 3:19 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Can you please run addr2line with this address present in the error log: 0x5222?

 

Thanks,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 11:29
To: devel@...; users@...
Subject: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hello World !!

 

Today after upgrading to v1.12.0-rc2, I'm getting following error while playing with sample code which is inspired from sample/bluetooth/mesh

 

 

[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [ERR] event_scan_prepare: assert: '!_radio.ticker_id_prepare' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x1b77e
Fatal fault in ISR! Spinning...

 

-------------------------------------------------------------------------------------------------------------------------

 

Sometime it completely hangs & nothing get displayed on debug terminal

 

-------------------------------------------------------------------------------------------------------------------------

 

Thank You !!

 

 

 

 

 

 

 

 

 


Re: flash testing app(soc_flash_nrf5) fails to complete when using segger RTT.

Carles Cufi
 

Hi Adberrezak,

I can reproduce the same issue here locally. I am copying Krzysztof and Andrzej to let them know, it might be that RTT has an issue with flash writes.

Regards,

Carles

-----Original Message-----
From: devel@lists.zephyrproject.org <devel@lists.zephyrproject.org> On
Behalf Of Abderrezak Mekkaoui
Sent: 30 May 2018 16:51
To: devel@lists.zephyrproject.org
Subject: [Zephyr-devel] flash testing app(soc_flash_nrf5) fails to
complete when using segger RTT.

Hi All,

When running the zephyr supplied flash test sample
(..\zephyr\samples\drivers\soc_flash_nrf5), it produces the correct
output when using the regular UART console.
But when I switch to the segger RTT it hangs before completing.
I would appreciate If you have any input on why this might be happening.
Is there any special precaution one has to observe when using the segger
RTT?
Thank you

Abderrezak


================================================================

..\zephyr\samples\drivers\soc_flash_nrf5

Output when using the segger RTT:

***** BOOTING ZEPHYR OS v1.11.0 - BUILD: May 29 2018 21:58:25 *****

Nordic nRF5 Flash Testing
=========================

Test 1: Flash erase page at 0x40000
   Flash erase succeeded!

Test 2: Flash write (word array 1)
   Attempted to write 1122 at 0x40000
   Attempted to read 0x40000
   Data read: 1122
   Data read matches data written. Good!
   Attempted to write aabb at 0x40004
   Attempted to read 0x40004
   Data read: aabb
   Data read matches data written. Good!
   Attempted to write abcd at 0x40008
   Attempted to read 0x40008
   Data read: abcd
   Data read matches data written. Good!
   Attempted to write 1234 at 0x4000c
   Attempted to read 0x4000c
   Data read: 1234
   Data read matches data written. Good!

Test 3: Flash erase (4 pages at 0x3e000)
   Flash erase succeeded!

Test 4: Flash write (word array 2)
   Attempted to write 1234 at 0x40000
   Attempted to read 0x40000
   Data read: 1234
   Data read matches data written. Good!
   Attempted to write aabb at 0



flash testing app(soc_flash_nrf5) fails to complete when using segger RTT.

Abderrezak Mekkaoui
 

Hi All,

When running the zephyr supplied flash test sample (..\zephyr\samples\drivers\soc_flash_nrf5), it produces the correct output when using the regular UART console.
But when I switch to the segger RTT it hangs before completing.
I would appreciate If you have any input on why this might be happening. Is there any special precaution one has to observe when using the segger RTT?
Thank you

Abderrezak


================================================================

..\zephyr\samples\drivers\soc_flash_nrf5

Output when using the segger RTT:

***** BOOTING ZEPHYR OS v1.11.0 - BUILD: May 29 2018 21:58:25 *****

Nordic nRF5 Flash Testing
=========================

Test 1: Flash erase page at 0x40000
   Flash erase succeeded!

Test 2: Flash write (word array 1)
   Attempted to write 1122 at 0x40000
   Attempted to read 0x40000
   Data read: 1122
   Data read matches data written. Good!
   Attempted to write aabb at 0x40004
   Attempted to read 0x40004
   Data read: aabb
   Data read matches data written. Good!
   Attempted to write abcd at 0x40008
   Attempted to read 0x40008
   Data read: abcd
   Data read matches data written. Good!
   Attempted to write 1234 at 0x4000c
   Attempted to read 0x4000c
   Data read: 1234
   Data read matches data written. Good!

Test 3: Flash erase (4 pages at 0x3e000)
   Flash erase succeeded!

Test 4: Flash write (word array 2)
   Attempted to write 1234 at 0x40000
   Attempted to read 0x40000
   Data read: 1234
   Data read matches data written. Good!
   Attempted to write aabb at 0


Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception #bluetoothmesh

Carles Cufi
 

This is starting to look more and more like a memory corruption or kernel issue at this point.

I cannot reproduce this easily by running our standard Bluetooth samples, so I am a bit at a loss here. I will try to run a mesh sample to see if it fails in the same way.

 

From: Vikrant More <vikrant8051@...>
Sent: 30 May 2018 13:05
To: Cufi, Carles <carles.cufi@...>
Cc: Von Dentz, Luiz <luiz.von.dentz@...>; Johan Hedberg <johan.hedberg@...>; devel@...; users@...
Subject: Re: [Zephyr-devel] [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi to all,

 

Suddenly get this non-stoppable FAULT

 

***** BUS FAULT *****
  Executing thread ID (thread): 0x20000220
  Faulting instruction address:  0x1c9a4
  Precise data bus error
  Address: 0xe5f7ffbe
Fatal fault in thread 0x20000220! Aborting.

 

Input -->

 

#/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1c9a4

 

Output -->

 

/home/vikrant/projects/zephyr/zephyr/kernel/include/ksched.h:153

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Thank You !!

 

 

 

 

 

On Wed, May 30, 2018 at 4:20 PM, vikrant8051 <vikrant8051@...> wrote:

Hi Carles,

 

Now get these FAULT/OOPS,

 

***** MPU FAULT *****

  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Instruction Access Violation
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** Kernel OOPS! *****
Current thread ID = 0x20001eb0
Faulting instruction address = 0x14f10

Fatal fault in ISR! Spinning...

 

 

 

Input -->

 

#/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x14f10

 

Output -->

 

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c:4702

 

 

Thanks !!

 

 

On Wed, May 30, 2018 at 4:11 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Thanks for looking into this. It seems like we do not get a buffer back from the command tx queue: https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/host/hci_core.c#L3318

 

I have copied Luiz and Johan from Intel in case they know what the cause might be.

 

Regards,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 12:31


To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

Input ->

/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x5222

 

Output ->

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/host/hci_core.c:3318

 

Thank You !!

 

On Wed, May 30, 2018 at 3:51 PM, Cufi, Carles <Carles.Cufi@...> wrote:

If you are using the Zephyr SDK:

 

path-to-zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e zephyr.elf <addr>

 

Carles

 

 

From: Vikrant More <vikrant8051@...>
Sent: 30 May 2018 12:11
To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

I will but don't know, how to do that ?

 

 

On Wed, May 30, 2018 at 3:19 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Can you please run addr2line with this address present in the error log: 0x5222?

 

Thanks,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 11:29
To: devel@...; users@...
Subject: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hello World !!

 

Today after upgrading to v1.12.0-rc2, I'm getting following error while playing with sample code which is inspired from sample/bluetooth/mesh

 

 

[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [ERR] event_scan_prepare: assert: '!_radio.ticker_id_prepare' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x1b77e
Fatal fault in ISR! Spinning...

 

-------------------------------------------------------------------------------------------------------------------------

 

Sometime it completely hangs & nothing get displayed on debug terminal

 

-------------------------------------------------------------------------------------------------------------------------

 

Thank You !!

 

 

 

 

 

 

 

 

 


Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception #bluetoothmesh

vikrant8051 <vikrant8051@...>
 

Hi to all,

Suddenly get this non-stoppable FAULT

***** BUS FAULT *****
  Executing thread ID (thread): 0x20000220
  Faulting instruction address:  0x1c9a4
  Precise data bus error
  Address: 0xe5f7ffbe
Fatal fault in thread 0x20000220! Aborting.

Input -->

#/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x1c9a4

Output -->

/home/vikrant/projects/zephyr/zephyr/kernel/include/ksched.h:153
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thank You !!





On Wed, May 30, 2018 at 4:20 PM, vikrant8051 <vikrant8051@...> wrote:
Hi Carles,

Now get these FAULT/OOPS,

***** MPU FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Instruction Access Violation
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** Kernel OOPS! *****
Current thread ID = 0x20001eb0
Faulting instruction address = 0x14f10
Fatal fault in ISR! Spinning...



Input -->

#/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x14f10

Output -->

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c:4702


Thanks !!


On Wed, May 30, 2018 at 4:11 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Thanks for looking into this. It seems like we do not get a buffer back from the command tx queue: https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/host/hci_core.c#L3318

 

I have copied Luiz and Johan from Intel in case they know what the cause might be.

 

Regards,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 12:31


To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

Input ->

/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x5222

 

Output ->

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/host/hci_core.c:3318

 

Thank You !!

 

On Wed, May 30, 2018 at 3:51 PM, Cufi, Carles <Carles.Cufi@...> wrote:

If you are using the Zephyr SDK:

 

path-to-zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e zephyr.elf <addr>

 

Carles

 

 

From: Vikrant More <vikrant8051@...>
Sent: 30 May 2018 12:11
To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

I will but don't know, how to do that ?

 

 

On Wed, May 30, 2018 at 3:19 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Can you please run addr2line with this address present in the error log: 0x5222?

 

Thanks,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 11:29
To: devel@...; users@...
Subject: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hello World !!

 

Today after upgrading to v1.12.0-rc2, I'm getting following error while playing with sample code which is inspired from sample/bluetooth/mesh

 

 

[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [ERR] event_scan_prepare: assert: '!_radio.ticker_id_prepare' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x1b77e
Fatal fault in ISR! Spinning...

 

-------------------------------------------------------------------------------------------------------------------------

 

Sometime it completely hangs & nothing get displayed on debug terminal

 

-------------------------------------------------------------------------------------------------------------------------

 

Thank You !!

 

 

 

 

 

 

 




Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception #bluetoothmesh

vikrant8051 <vikrant8051@...>
 

Hi Carles,

Now get these FAULT/OOPS,

***** MPU FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Instruction Access Violation
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** USAGE FAULT *****
  Executing thread ID (thread): 0x20001eb0
  Faulting instruction address:  0x200006b8
  Illegal load of EXC_RETURN into PC
Fatal fault in thread 0x20001eb0! Aborting.
***** Kernel OOPS! *****
Current thread ID = 0x20001eb0
Faulting instruction address = 0x14f10
Fatal fault in ISR! Spinning...



Input -->

#/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x14f10

Output -->

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c:4702


Thanks !!


On Wed, May 30, 2018 at 4:11 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Thanks for looking into this. It seems like we do not get a buffer back from the command tx queue: https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/host/hci_core.c#L3318

 

I have copied Luiz and Johan from Intel in case they know what the cause might be.

 

Regards,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 12:31


To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

Input ->

/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e /home/vikrant/projects/zephyr/zephyr/samples/bluetooth/mesh2/build/zephyr/zephyr.elf 0x5222

 

Output ->

/home/vikrant/projects/zephyr/zephyr/subsys/bluetooth/host/hci_core.c:3318

 

Thank You !!

 

On Wed, May 30, 2018 at 3:51 PM, Cufi, Carles <Carles.Cufi@...> wrote:

If you are using the Zephyr SDK:

 

path-to-zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-addr2line -e zephyr.elf <addr>

 

Carles

 

 

From: Vikrant More <vikrant8051@...>
Sent: 30 May 2018 12:11
To: Cufi, Carles <carles.cufi@...>
Cc: devel@...; users@...
Subject: Re: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hi Carles,

 

I will but don't know, how to do that ?

 

 

On Wed, May 30, 2018 at 3:19 PM, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Vikrant,

 

Can you please run addr2line with this address present in the error log: 0x5222?

 

Thanks,

 

Carles

 

From: users@... <users@...> On Behalf Of vikrant8051
Sent: 30 May 2018 11:29
To: devel@...; users@...
Subject: [Zephyr-users] #BluetoothMesh ...about latest kernel OOPS & exception

 

Hello World !!

 

Today after upgrading to v1.12.0-rc2, I'm getting following error while playing with sample code which is inspired from sample/bluetooth/mesh

 

 

[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [WRN] process_events: Unexpected k_poll event state 7
[bt] [WRN] process_events: Unexpected k_poll event state 8
[bt] [ERR] hci_tx_thread: assert: 'err == 0' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x5222
Fatal fault in thread 0x20000484! Aborting.
[bt] [ERR] event_scan_prepare: assert: '!_radio.ticker_id_prepare' failed
***** Kernel OOPS! *****
Current thread ID = 0x20000484
Faulting instruction address = 0x1b77e
Fatal fault in ISR! Spinning...

 

-------------------------------------------------------------------------------------------------------------------------

 

Sometime it completely hangs & nothing get displayed on debug terminal

 

-------------------------------------------------------------------------------------------------------------------------

 

Thank You !!

 

 

 

 

 

 

 


3381 - 3400 of 8033