Date   

Re: GDB thread listing on NUCLEO-F091RC

evan.gates@...
 

evan.gates@gmail.com wrote:

I'm using the zephyr branch of openocd
found here: https://github.com/zephyrproject-rtos/openocd/tree/zephyr
I also just tried cherry picking that commit on openocd's upstream master
branch. The results are the same.


Re: k_sleep on mimxrt1050_evk board

Maureen Helm
 

Hi Marco,

We traced the issue down to a difference in low-power mode behavior between A0 and A1 silicon (EVK and EVKB boards respectively). Please give the following PR a try:

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

 

Thanks,

Maureen

 

From: users@... [mailto:users@...] On Behalf Of Maureen Helm
Sent: Monday, June 18, 2018 4:15 PM
To: marco.hoefle@...; users@...
Subject: Re: [Zephyr-users] k_sleep on mimxrt1050_evk board

 

Hi Marco,

This board has two versions, EVK and EVKB, which correspond to different revisions of silicon (A0 and A1, respectively). The EVK board works just fine, but I was able to reproduce the issue on the EVKB board. There does appear to be a problem with the timer, but I’m still investigating.

 

Please go ahead and file a bug so we can track it.

 

Maureen

 

From: users@... [mailto:users@...] On Behalf Of marco.hoefle@...
Sent: Friday, June 15, 2018 12:48 AM
To: users@...
Subject: Re: [Zephyr-users] k_sleep on mimxrt1050_evk board

 

Hello Anas,
I will, I just let Maureen have a look first just in case I need to add something to the kernel config or I am doing something wrong.
Marco


GDB thread listing on NUCLEO-F091RC

evan.gates@...
 

I'm runing Zephyr 1.10 on a NUCLEO-F091RC. It's a Cotex-M0. I want to
be able to debug it with GDB. I've included snipits of command output
inline with more verbose output at the end of the message.

I'm using the zephyr branch of openocd
found here: https://github.com/zephyrproject-rtos/openocd/tree/zephyr

It contains this commit adding zephyr support:
https://github.com/zephyrproject-rtos/openocd/commit/7852ae77b12118dbf902d85ab826ed0261c144ad

I've added a change in rtos/Zephyr.c so it can recognize my board.

diff --git a/src/rtos/Zephyr.c b/src/rtos/Zephyr.c
index 6fa0ffb..e60d3b5 100644
--- a/src/rtos/Zephyr.c
+++ b/src/rtos/Zephyr.c
@@ -66,6 +66,11 @@ static struct Zephyr_params Zephyr_params_list[] = {
.reg_stacking = &rtos_standard_Cortex_M4F_FPU_stacking,
},
{
+ .target_name = "hla_target",
+ .pointer_width = 4,
+ .reg_stacking = &rtos_standard_Cortex_M3_stacking,
+ },
+ {
.target_name = NULL
}
};

I chose the M3 stacking as it looks to me like it's closest to M0. I
can't tell if I have to make any other changes. Particularly, the size
and number of core regs looks right, but I have no idea where the initial
offset of 0x20 comes from in rtos_standard_Cortex_M3_stack_offsets.

I did find a note in src/target/cortex_m.c saying:

NOTE: most of this should work fine for the Cortex-M1 and
Cortex-M0 cores too, although they're ARMv6-M not ARMv7-M.

Which makes me think this may be alright.

I'm using the zephyr-sdk tcl files for openocd, specifically
interface/stlink-v2-1.cfg and target/stm32f09x.cfg. I
added -rtos auto to the end of the $_TARGETNAME configure
-work-area-phys line of target/stm32f09x.cfg as mentioned here:
https://github.com/zephyrproject-rtos/zephyr/issues/2933

Now gdb recognizes threads, but it seems like some things aren't working
correctly. Threads look like they have the right stack pointer but many
have program counter 0:

sp 0x200019f0 0x200019f0 <adc_stack+224>
pc 0x0 0x0

Some have program counter 0x08012718. If I'm reading the objdump output
correctly, it looks like it's the last word in the rodata section:

objdump -h zephyr.elf
Idx Name Size VMA LMA File off Algn
...
3 rodata 00001ed8 08010844 08010844 000088f8 2**2
...

08010844 + 00001ed8 = 0801271c

Backtraces often end with:
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Questions:
- Does this look wrong to you, too?
- Do I have to make other changes for Cortex-M0?
- Can you tell what's going on with the pc?
- Is there any other information I can provide that would be helpful?

I'd greatly appreciate any help/hints/guesses/pointers to other docs, etc.

Thanks,
Evan





Full output listings

objdump -h zephyr.elf:

zephyr.elf: file format elf32-littlearm

Sections:
Idx Name Size VMA LMA File off Algn
0 text 00008762 08008000 08008000 000000b4 2**2
CONTENTS, ALLOC, LOAD, CODE
1 .ARM.exidx 00000008 08010764 08010764 00008818 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 devconfig 000000d8 0801076c 0801076c 00008820 2**2
CONTENTS, ALLOC, LOAD, DATA
3 rodata 00001ed8 08010844 08010844 000088f8 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .st_stm32f0x_vt 000003e8 20000000 20000000 0000bb70 2**0
ALLOC
5 bss 00001528 200003e8 200003e8 0000bb70 2**3
ALLOC
6 noinit 00001700 20001910 20001910 0000bb70 2**3
ALLOC
7 datas 000011d0 20003010 0801271c 0000a7d0 2**2
CONTENTS, ALLOC, LOAD, DATA
8 initlevel 000000d8 200041e0 080138ec 0000b9a0 2**2
CONTENTS, ALLOC, LOAD, DATA
9 _k_timer_area 000000d0 200042b8 080139c4 0000ba78 2**2
CONTENTS, ALLOC, LOAD, DATA
10 _k_mutex_area 00000028 20004388 08013a94 0000bb48 2**2
CONTENTS, ALLOC, LOAD, DATA
11 .debug_info 00040fcb 00000000 00000000 0000bb70 2**0
CONTENTS, READONLY, DEBUGGING
12 .debug_abbrev 0000b71b 00000000 00000000 0004cb3b 2**0
CONTENTS, READONLY, DEBUGGING
13 .debug_aranges 00001560 00000000 00000000 00058258 2**3
CONTENTS, READONLY, DEBUGGING
14 .debug_line 00011973 00000000 00000000 000597b8 2**0
CONTENTS, READONLY, DEBUGGING
15 .debug_str 00009c35 00000000 00000000 0006b12b 2**0
CONTENTS, READONLY, DEBUGGING
16 .comment 00000011 00000000 00000000 00074d60 2**0
CONTENTS, READONLY
17 .ARM.attributes 0000002f 00000000 00000000 00074d71 2**0
CONTENTS, READONLY
18 .debug_loc 00015509 00000000 00000000 00074da0 2**0
CONTENTS, READONLY, DEBUGGING
19 .debug_ranges 00001df8 00000000 00000000 0008a2b0 2**3
CONTENTS, READONLY, DEBUGGING
20 .debug_frame 00002cf0 00000000 00000000 0008c0a8 2**2
CONTENTS, READONLY, DEBUGGING

openocd command:
/usr/local/bin/openocd -s $(PROJECT_DIR)/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/share/openocd/scripts/ \
-f $(PROJECT_DIR)/stm32f0.cfg -c 'gdb_port 3333' -c init -c targets -c halt

gdb command:
PATH=$(PROJECT_DIR)/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi:$(PATH) \
arm-zephyr-eabi-gdb --eval-command="target remote :3333" \
$(BUILD_DIR_BASE)/fw/zephyr/zephyr.elf

openocd output:
Open On-Chip Debugger 0.10.0-g7852ae7-dirty (2018-06-20-14:35)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
none separate
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v28 API v2 SWIM v17 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.255336
Info : stm32f0x.cpu: hardware has 4 breakpoints, 2 watchpoints
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* stm32f0x.cpu hla_target little stm32f0x.cpu running
target halted due to debug-request, current mode: Thread
xPSR: 0x21000000 pc: 0x0800ccf8 psp: 0x200027f8
Info : accepting 'gdb' connection on tcp/3333
Debugger attaching: halting execution
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
adapter speed: 950 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x080028ec msp: 0x20004ec8
force hard breakpoints
Info : device id = 0x10006442
Info : flash size = 256kbytes
Info : Zephyr: does it have symbol 0 (mandatory)?
Info : Zephyr: does it have symbol 1 (mandatory)?
Info : Zephyr: does it have symbol 2 (mandatory)?
Info : Zephyr: all mandatory symbols found
Info : Auto-detected RTOS: Zephyr
Info : Zephyr: looking for target: hla_target
Info : Zephyr: target known, params at 0x83f460

gdb commands:
info threads
thread apply all bt
thread apply all info reg

gdb output:
GNU gdb (GDB) 7.11.0.20160511-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-pokysdk-linux --target=arm-zephyr-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/emg/gnar/gbxv2-mcu/build/nucleo_f091rc/fw/zephyr/zephyr.elf...done.
Remote debugging using :3333
0x080028ec in ?? ()
(gdb) c
Continuing.
^C[New Thread 536871912]
[New Thread 536872188]
[New Thread 536874900]
[New Thread 536872312]
[New Thread 536872024]
[New Thread 536875012]
[New Thread 536872572]
[New Thread 536876624]
[New Thread 536876728]

Thread 1 received signal SIGINT, Interrupt.
[Switching to Thread 536873704]
OLED_WEO012864L_ClearPixel (Xpos=Xpos@entry=55, Ypos=Ypos@entry=27) at /home/emg/gnar/gbxv2-mcu/fw/src/oled_weo012864l.c:889
889 OLED_WEO012864L_DrawPixel(Xpos, Ypos, BackColor);
(gdb) info threads
Id Target Id Frame
* 1 Thread 536873704 (Name: thr_20002070_20000ae8, prio:-13,useropts:0) OLED_WEO012864L_ClearPixel (Xpos=Xpos@entry=55, Ypos=Ypos@entry=27)
at /home/emg/gnar/gbxv2-mcu/fw/src/oled_weo012864l.c:889
2 Thread 536871912 (Name: thr_200019f0_200003e8, prio:-12,useropts:0) 0x00000000 in ?? ()
3 Thread 536872188 (Name: thr_20001c70_200004fc, prio:-12,useropts:0) 0x03000000 in ?? ()
4 Thread 536874900 (Name: thr_20002170_20000f94, prio:-12,useropts:0) 0x00000000 in ?? ()
5 Thread 536872312 (Name: thr_20001d70_20000578, prio:-12,useropts:0) 0x08012718 in ?? ()
6 Thread 536872024 (Name: thr_20001af0_20000458, prio:-12,useropts:0) 0x08012718 in ?? ()
7 Thread 536875012 (Name: thr_200022f0_20001004, prio:-12,useropts:0) 0x08012718 in ?? ()
8 Thread 536872572 (Name: thr_20001ef0_2000067c, prio:-12,useropts:0) 0x00000000 in ?? ()
9 Thread 536876624 (Name: thr_200027f0_20001650, prio:15,useropts:1) 0x0f8a158a in ?? ()
10 Thread 536876728 (Name: thr_200026f0_200016b8, prio:0,useropts:1) 0x20004e94 in ?? ()
(gdb) thread apply all bt

Thread 10 (Thread 536876728):
#0 0x20004e94 in ?? ()
#1 0x08012718 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 9 (Thread 536876624):
#0 0x0f8a158a in ?? ()
#1 0x0800f960 in _thread_entry (entry=0x1, p1=<optimized out>, p2=<optimized out>, p3=<optimized out>) at /home/emg/gnar/gbxv2-mcu/zephyr/kernel/thread.c:194
#2 0x94c3f7dc in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 8 (Thread 536872572):
#0 0x00000000 in ?? ()
#1 0x0800f960 in _thread_entry (entry=0x0, p1=<optimized out>, p2=<optimized out>, p3=<optimized out>) at /home/emg/gnar/gbxv2-mcu/zephyr/kernel/thread.c:194
#2 0x00000000 in ?? ()

Thread 7 (Thread 536875012):
#0 0x08012718 in ?? ()
#1 0x0800bf12 in k_sleep (duration=100) at /home/emg/gnar/gbxv2-mcu/build/nucleo_f091rc/fw/zephyr/include/generated/syscalls/kernel.h:19
#2 gbxv2_system_thread_entry () at /home/emg/gnar/gbxv2-mcu/fw/src/system.c:56
#3 0x00000000 in ?? ()

Thread 6 (Thread 536872024):
#0 0x08012718 in ?? ()
#1 0x08008ba6 in k_sleep (duration=1000) at /home/emg/gnar/gbxv2-mcu/build/nucleo_f091rc/fw/zephyr/include/generated/syscalls/kernel.h:19
#2 gbxv2_battery_thread_entry () at /home/emg/gnar/gbxv2-mcu/fw/src/battery.c:112
#3 0x00000000 in ?? ()

Thread 5 (Thread 536872312):
#0 0x08012718 in ?? ()
#1 0x080094d6 in k_sleep (duration=1000) at /home/emg/gnar/gbxv2-mcu/build/nucleo_f091rc/fw/zephyr/include/generated/syscalls/kernel.h:19
#2 gbxv2_charger_thread_entry () at /home/emg/gnar/gbxv2-mcu/fw/src/charger.c:190
#3 0x00000000 in ?? ()

Thread 4 (Thread 536874900):
#0 0x00000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 3 (Thread 536872188):
#0 0x03000000 in ?? ()
#1 0x00000000 in ?? ()

Thread 2 (Thread 536871912):
#0 0x00000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 536873704):
#0 OLED_WEO012864L_ClearPixel (Xpos=Xpos@entry=55, Ypos=Ypos@entry=27) at /home/emg/gnar/gbxv2-mcu/fw/src/oled_weo012864l.c:889
#1 0x0800ae82 in OLED_WEO012864L_DrawSprite (Xpos=<optimized out>, Ypos=<optimized out>, sprite=sprite@entry=0x200036ac <GnarboxLogo>)
at /home/emg/gnar/gbxv2-mcu/fw/src/oled_weo012864l.c:317
#2 0x0800a5e6 in gbxv2_oled_thread_entry () at /home/emg/gnar/gbxv2-mcu/fw/src/oled.c:197
#3 0x0800f960 in _thread_entry (entry=0x800a531 <gbxv2_oled_thread_entry>, p1=<optimized out>, p2=<optimized out>, p3=<optimized out>)
at /home/emg/gnar/gbxv2-mcu/zephyr/kernel/thread.c:194
#4 0x00000800 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) thread apply all info reg

Thread 10 (Thread 536876728):
r0 0x800ec19 134278169
r1 0x800a395 134259605
r2 0x8012718 134293272
r3 0x8011674 134289012
r4 0x0 0
r5 0xe000ed04 -536810236
r6 0x200016b8 536876728
r7 0x10000000 268435456
r8 0x0 0
r9 0x800f689 134280841
r10 0x800cb60 134269792
r11 0x61000000 1627389952
r12 0x30 48
sp 0x20002700 0x20002700 <_main_stack+1008>
lr 0x8012718 134293272
pc 0x20004e94 0x20004e94
xPSR 0x800ec37 134278199

Thread 9 (Thread 536876624):
r0 0x8010735 134285109
r1 0x8010745 134285125
r2 0x8010735 134285109
r3 0x800f961 134281569
r4 0x1 1
r5 0x0 0
r6 0x20000af8 536873720
r7 0x2000172c 536876844
r8 0x8010735 134285109
r9 0x8010733 134285107
r10 0x800ccf8 134270200
r11 0x21000000 553648128
r12 0x0 0
sp 0x2000281c 0x2000281c <_interrupt_stack+12>
lr 0x800f961 134281569
pc 0xf8a158a 0xf8a158a
xPSR 0xaa9a76c5 -1432717627

Thread 8 (Thread 536872572):
r0 0x0 0
r1 0x8009caf 134257839
r2 0x8009c85 134257797
r3 0x0 0
r4 0x0 0
r5 0xe000ed04 -536810236
r6 0x2000067c 536872572
r7 0x10000000 268435456
r8 0x0 0
r9 0x800f689 134280841
r10 0x800cb60 134269792
r11 0x61000000 1627389952
r12 0x0 0
sp 0x20001f10 0x20001f10 <oled_stack>
lr 0x800f961 134281569
pc 0x0 0x0
xPSR 0x0 0

Thread 7 (Thread 536875012):
r0 0x0 0
r1 0xb 11
r2 0x1 1
r3 0x0 0
r4 0x0 0
r5 0xe000ed04 -536810236
r6 0x20001004 536875012
r7 0x10000000 268435456
r8 0x0 0
r9 0x800f4f9 134280441
r10 0x800cb60 134269792
r11 0x61000000 1627389952
r12 0x1 1
sp 0x200022d8 0x200022d8 <system_stack+328>
lr 0x800bf13 134266643
pc 0x8012718 0x8012718
xPSR 0x8011d84 134290820

Thread 6 (Thread 536872024):
r0 0x20001004 536875012
r1 0x65 101
r2 0x200004c4 536872132
r3 0x0 0
r4 0x0 0
r5 0xe000ed04 -536810236
r6 0x20000458 536872024
r7 0x10000000 268435456
r8 0xb9c 2972
r9 0x800f4f9 134280441
r10 0x800cb60 134269792
r11 0x41000000 1090519040
r12 0x0 0
sp 0x20001af4 0x20001af4 <battery_stack+228>
lr 0x8008ba7 134253479
pc 0x8012718 0x8012718
xPSR 0x8012718 134293272

Thread 5 (Thread 536872312):
r0 0x0 0
r1 0x65 101
r2 0x2280 8832
r3 0x200005e4 536872420
r4 0x0 0
r5 0xe000ed04 -536810236
r6 0x20000578 536872312
r7 0x10000000 268435456
r8 0x0 0
r9 0x800f4f9 134280441
r10 0x800cb60 134269792
r11 0x61000000 1627389952
r12 0xa000 40960
sp 0x20001d70 0x20001d70 <charger_stack+224>
lr 0x80094d7 134255831
pc 0x8012718 0x8012718
xPSR 0x8010c34 134286388

Thread 4 (Thread 536874900):
r0 0x200018c8 536877256
r1 0x800b8f9 134265081
r2 0x0 0
r3 0x0 0
r4 0x0 0
r5 0xe000ed04 -536810236
r6 0x20000f94 536874900
r7 0x10000000 268435456
r8 0x0 0
r9 0x800f689 134280841
r10 0x800cb60 134269792
r11 0x61000000 1627389952
r12 0x800b8c9 134265033
sp 0x20002180 0x20002180 <rgb_led_stack+240>
lr 0x0 0
pc 0x0 0x0
xPSR 0x800b8c9 134265033

Thread 3 (Thread 536872188):
r0 0x20001c7c 536878204
r1 0x8009065 134254693
r2 0x1 1
r3 0x800 2048
r4 0x0 0
r5 0xe000ed04 -536810236
r6 0x200004fc 536872188
r7 0x10000000 268435456
r8 0x2000 8192
r9 0x800f689 134280841
r10 0x800cb60 134269792
r11 0x61000000 1627389952
r12 0x8009011 134254609
sp 0x20001c80 0x20001c80 <usb_otg_stack+368>
lr 0x0 0
pc 0x3000000 0x3000000
xPSR 0x60002 393218

Thread 2 (Thread 536871912):
r0 0x80088c1 134252737
r1 0x80088cf 134252751
r2 0x0 0
r3 0x0 0
r4 0x0 0
r5 0xe000ed04 -536810236
r6 0x200003e8 536871912
r7 0x10000000 268435456
r8 0x0 0
r9 0x800f689 134280841
r10 0x800cb60 134269792
r11 0x61000000 1627389952
r12 0x0 0
sp 0x200019f0 0x200019f0 <adc_stack+224>
lr 0x0 0
pc 0x0 0x0
xPSR 0x0 0

Thread 1 (Thread 536873704):
r0 0x37 55
r1 0x1b 27
r2 0x0 0
r3 0x1a 26
r4 0x1f 31
r5 0x1 1
r6 0x200036ac 536884908
r7 0x18 24
r8 0x1a 26
r9 0x0 0
r10 0x0 0
r11 0x0 0
r12 0x20002050 536879184
sp 0x20002028 0x20002028 <oled_stack+280>
lr 0x800ae83 134262403
pc 0x800ac46 0x800ac46 <OLED_WEO012864L_ClearPixel+2>
xPSR 0x1000000 16777216
(gdb)


Its a question regarding the nrf Connect App from Nordic #ble #nrf52832 #bluetoothmesh

Rajat Kalyan
 

Hi Everyone,

Does anyone here have any idea about the process to be followed in order to receive data onto the nrf Connect App for android.
I have been trying to achieve something similar to this video  : https://www.youtube.com/watch?v=o5Ve_msz1b8


Re: I have configured UART nordic services using zephyr api, but i don't know what fucntion oof api to use so that i can send data to the ble APP ANDROID #nrf52832 #ble #bluetoothmesh

Carles Cufi
 

Hi Rajat,

 

This is a preliminary implementation of the NUS service done by one of our engineers (copied)

 

https://github.com/junqingzou/Zephyr_NUS_Sample

 

Feel free to experiment and push it upstream.

 

Regards,

 

Carles

 

From: users@... <users@...> On Behalf Of Rajat Kalyan
Sent: 20 June 2018 07:24
To: users@...
Subject: [Zephyr-users] I have configured UART nordic services using zephyr api, but i don't know what fucntion oof api to use so that i can send data to the ble APP ANDROID #ble #bluetoothmesh #nrf52832

 

Hi Everyone,

I have successfully configured the UART services for Nordic nrf connect App along with charcaterstic of rx and tx.
But when i turn the notification ON , i am not able to see any data that is being sent to the BLE App.
Is there any special function to achieve that ?
Is there any example code in zephyr os that would help me out?

Thanks 
Rajat


Re: Were to send patches & Looking for a example for ADC and DFSDM for the stm32f4

Erwan Gouriou
 

Hi Stefan,

I've not heard about DFSM support so far, but support would be welcomed indeed.

About ADC, I advise to have a look to adc drivers implemented so far /drivers/adc/.
You could rely on STM32Cube HAL to help you in implementing the driver.

For new pin configuration , you should know that pinctrl is not used from dts yet,
but you can submit  a patch and we can have a look.

Erwan


On Tue, 19 Jun 2018 at 13:57, Stefan Jaritz <stefan@...> wrote:
Hej

I still playing a bit around with Zephyr OS.

I manged so far to setup the UART1 using PA10 & PA15. This config is not
included. I can submit a patch. Who is maintaining the stm32 dts?

Now I want to go one step further. I would like to use the ADC and the
DFSDM module of the stm32f4. I was checking the sample section. I only
found the "grove_temperature" as an ADC sample. But for me it still
remains unclear how to do ADC in Zephyr OS from the scratch.


Maybe someone can explain it to me at an example:

1) ADC

My "simple" problem is to read the PC1(ADC Channel 11), PC3(ADC Channel
13) and VRefInt. I created my own board. I would like to know all the
necessary steps to finally read in my main.c a value from the ADC :D

Think to solve this I need to add some lines at

pinmux.c

myBoard.dts

myBoard_defconfig

main.c

2nd) DFSDM

The stm32f4 MCU contains a DFSDM interface. I like to use it to read
microphone data. Are there people who tried to do this in zephyr? What
were the steps? Is there a DFSDM driver?

Kind regards!

Stefan





I have configured UART nordic services using zephyr api, but i don't know what fucntion oof api to use so that i can send data to the ble APP ANDROID #nrf52832 #ble #bluetoothmesh

Rajat Kalyan
 

Hi Everyone,

I have successfully configured the UART services for Nordic nrf connect App along with charcaterstic of rx and tx.
But when i turn the notification ON , i am not able to see any data that is being sent to the BLE App.
Is there any special function to achieve that ?
Is there any example code in zephyr os that would help me out?

Thanks 
Rajat


Zephyr development news, 19 June 2018

Marti Bolivar
 

Hello,

This is the 19 June 2018 newsletter tracking the latest Zephyr
development merged into the mainline tree on GitHub.

An HTML version is available here:

https://opensourcefoundries.com/blog/2018/06/19/zephyr-news-20180619/

As usual, content is broken down as follows:

- Highlights
- Important changes: ABI/API breaks and some features
- New features: non-exhaustive descriptions of new features
- Bug fixes: non-exhaustive list of fixed bugs
- Individual changes: a complete list of patches, sorted
chronologically and categorized into areas, like:
- Architectures
- Kernel
- Drivers
- etc.

Highlights
==========

The floodgates are open with the beginning of the v1.13 merge
window. This newsletter covers the following inclusive commit range:

- 0f9a6426 ("release: Post-release patch level update"), merged
11 June 2018
- fb6f9b78 ("ext: Kconfig: Remove redundant 'default n' properties"),
merged 18 June 2018

Important Changes
-----------------

CONF_FILE can now be a CMake list:

Most Zephyr users will likely recognize the CMake variable CONF_FILE,
which can be used to set the path to the top-level application Kconfig
fragment. (Normally, this defaults to prj.conf.)

A longstanding but lesser-known feature is that CONF_FILE can also
be a whitespace-separated list of fragments; these will all be merged
into the final configuration. Some samples use this feature to add
board-specific "mix-ins" to the top-level prj.conf; see the
led_ws2812 CMakeLists.txt for an example:

https://github.com/zephyrproject-rtos/zephyr/blob/fb6f9b78c9094ca9ae7cc16aa43eb1988ba18440/samples/drivers/led_ws2812/CMakeLists.txt

The "whitespace-separated" part of this feature is a holdover from
when Zephyr used the Linux kernel's Makefile build system,
Kbuild. Since moving to CMake, the whitespace separation has been a
little bit less convenient, as CMake uses semicolon-separated strings
as its internal "list" data type.

To make this feature cleaner in the new world order, CONF_FILE now
also supports separation via semicolons. The old whitespace separation
behavior is not affected to keep backwards compatibility. For example,
setting the following at the CMake command line would merge the three
fragments hello.conf, world.conf, and zephyr.conf into the final
.config:

-DCONF_FILE="hello.conf;world.conf zephyr.conf"

PWM on STM32:

Device tree bindings were added for timers and PWM devices on STM32
targets. A large variety of STM32 targets (F0, F1, F3, F4, and L4
families) now have such nodes added on a per-SoC basis. Many of the
official boards produced by STMicroelectronics now have PWM enabled.

The old Kconfig options (CONFIG_PWM_STM32_x_DEV_NAME, etc.) have
been removed. Applications using PWM on STM32 may need updates to
reflect this switch to device tree.

UART on nRF:

The UART driver for nRF devices has been refactored to use the vendor
HAL. This change was followed by a large tree-wide rename of the
Kconfig options: CONFIG_UART_NRF5 was renamed to CONFIG_UART_NRFX,
and CONFIG_UART_NRF5_xxx options were renamed to
CONFIG_UART_0_NRF_xxx.

Applications using this driver may need updates.

Many Kconfig warnings are now errors:

The tree-wide cleanups and improvements to Zephyr's usage of Kconfig
continues as Kconfiglib grows more features. Notably, many warnings
are now errors, improving the rate at which CI catches Kconfig
issues.

Features
--------

Arches:

The work to enable Arm v8-M SoCs, some of which include support for
"secure" and "non-secure" execution states, continues. There is a new
CONFIG_ARM_NONSECURE_FIRMWARE option, which signals that the
application being built is targeting the non-secure execution
state. This depends on a new hidden CONFIG_ARMV8_M_SE option, which
SoCs can select to signal that hardware support for this feature is
present. This was followed with infrastructure APIs related to address
accessibility and interrupt management in secure and non-secure
contexts.

The native POSIX "architecture" now supports -rt and -no-rt
command line options, which allow deferring the decision for whether
execution should be slowed down to real time to runtime. (The option
CONFIG_NATIVE_POSIX_SLOWDOWN_TO_REAL_TIME now determines the default
value.) More information on using Zephyr's POSIX target is here:

http://docs.zephyrproject.org/boards/posix/native_posix/doc/board.html

Bluetooth:

There is a new choice option for controlling the transmit power:

http://docs.zephyrproject.org/reference/kconfig/choice_149.html

On Linux hosts, the native POSIX target can now access the kernel
Bluetooth stack via a new HCI driver, which can be enabled with
CONFIG_BT_USERCHAN.

The Bluetooth mesh sample application
samples/boards/nrf52/mesh/onoff-app now supports the persistent
storage API introduced in v1.12. This allows the application to rejoin
the same network if the board is reset.

The host stack now supports more flexible choices for how to pass
attributes to bt_gatt_notify().

Boards:

The frdm_kl25z board now supports USB.

Nordic board Kconfig files can now select CONFIG_BOARD_HAS_DCDC,
which will enable the DC/DC converter.

Build:

There is a new CONFIG_SPEED_OPTIMIZATIONS flag, which requests the
build system to optimize for speed. (The default is to optimize for
binary size.)

The warning output for when the value a user sets for a Kconfig option
differs from the actual value has been improved.

Documentation:

Zephyr's Kconfig documentation now includes output for choices. For
example, here is the page documenting the architecture choice:

http://docs.zephyrproject.org/reference/kconfig/choice_0.html#choice-0

Device Tree:

The RISCV32 QEMU target now has DT support for flash, SRAM, and UART.

nRF52 SoCs now have device tree support for GPIO.

Drivers:

A variety of nRF peripheral accesses throughout the tree were replaced
with calls to inline accessors in the vendor HAL. The stated reason
given is to enable easier testing.

The nRF PWM driver now has prescaler support.

The mcux Ethernet driver now uses the carrier detection API calls
described below in the new networking features.

A new driver for the TI SimpleLink WiFi offload chip was merged; so
far, this only supports the network management commands related to
WiFi which were introduced for v1.12 (see include/net/wifi_mgmt.h
for details).

A variety of USB-related changes were merged.

The USB subsystem now sports new USBD_DESCR_xxx_DEFINE macros for
declaring descriptors of various types; behind the scenes, these use
linker magic to ensure that the defined descriptors end up in
contiguous memory. This allowed migrating descriptors formerly defined
in an increasingly large subsys/usb/usb_descriptor.c into the files
for the individual USB classes, etc. that defined them.

As all Zephyr USB controllers support USB v2.0, the USB protocol
version reported in the device descriptor has been updated to that
value, increasing it from its former setting of v1.1.

The HID interrupt endpoint size configuration option
CONFIG_HID_INTERRUPT_EP_MPS is now visible and thus configurable by
applications.

Interface descriptors are now configurable at runtime.

Networking:

Ethernet drivers can now signal detection and loss of a carrier via
new net_eth_carrier_on() and net_eth_carrier_off() routines. This is
used by the network management APIs to generate interface "up" and
"down" events.

http://docs.zephyrproject.org/subsystems/networking/network-management-api.html

The DHCP implementation uses these events to obtain new addresses when
a network interface reappears after going down.

The network shell's conn command now unconditionally prints the
state of each TCP connection.

A variety of performance improvements were merged into the networking
layer; these speed things up by avoiding unnecessary work, like
duplicated filling in of packet headers and checksums. Better
management of some internal caches when multiple networking interfaces
are running on board was also merged.

Samples:

The BBC micro:bit now supports servomotors; see samples/basic/servo_motor.

Scripts:

A variety of updates were merged to the Kconfiglib dependency vendored
into Zephyr, along with its users; these are mostly related to
hardening warnings into errors and improving error and warning output.

Testing:

The long-ranging work on issue 6991:

https://github.com/zephyrproject-rtos/zephyr/issues/6991

continues with several samples being refactored, moved or otherwise
cleaned up to better fit in a test management system.

Bug Fixes
---------

Arches:

The PendSV interrupt handler on ARM now prevents other operating
system interrupts from running before accessing kernel state,
preventing races.

Bluetooth:

The USB Bluetooth device class implementation saw a few
fixes. Notably, it now has a transmit thread as well as a receive
thread, fixing an issue where bt_send() was incorrectly called
from interrupt context, and properly reserves some headroom needed in
its net_buf structures.

Build:

The CONFIG_COMPILER_OPT option now allows setting multiple compiler
options, separated by whitespace.

Numerous fixes and updates were merged affecting usage of Kconfig
options throughout the tree.

The "minimal" C library that ships with Zephyr is no longer built as
part of the "app" target, which is reserved as much as possible for
user applications. Any applications that may have been relying on this
behavior may need updates, as the C library is now part of its own
Zephyr library.

Drivers:

Bluetooth drivers now have access to bt_hci_cmd_send() and
bt_hci_cmd_send_sync() routines via <hci.h>; allowing them to,
well, send HCI commands. HCI drivers can now also declare "quirks", or
deviations from standard behavior, with BT_QUIRK_NO_RESET being the
first user.

The Nordic RTC timer driver saw a fix for the number of hardware
cycles per tick; the PWM driver also has improved accuracy after a
clock frequency fix.

A build issue in the Bluetooth HCI implementation using SPI as a
transport was fixed.

The lis2dh accelerometer driver seems to be working again, after
seeing build breakage and I2C protocol usage fixes.

Kernel:

A fix was merged partially restoring the behavior of
CONFIG_MULTITHREADING=n following the scheduler rewrite. (Some
former behavior related to semaphores was not restored, forcing flash
drivers elsewhere in the tree to behave differently depending on
whether this option is enabled.)

A race condition which could cause k_poll() to return NULL when a
timeout is set has been fixed.

Networking:

The TCP stack now properly responds to Zero Window Probe segments (see
https://tools.ietf.org/html/rfc6429 for details on these).

Some use-after free bugs in network statistics calculations were fixed.

IPv4 and UDP checksums are now calculated only when needed in the DHCPv4 core.

Samples:

The mbedtls_sslclient networking sample now uses a hardware
entropy source at system startup to seed the random number generator
when one is available, rather than relying on sys_rand32_get(),
which doesn't guarantee cryptographically strong output.

Individual Changes
==================

Patches by area (226 patches total):

- Arches: 26
- Bluetooth: 25
- Boards: 5
- Build: 14
- Continuous Integration: 2
- Device Tree: 11
- Documentation: 12
- Drivers: 59
- External: 3
- Kernel: 5
- Libraries: 2
- Miscellaneous: 3
- Networking: 27
- Samples: 12
- Scripts: 11
- Storage: 1
- Testing: 8

Arches (26):

- a7de06a6 native_posix: irq_offload to use a sw interrupt
- 477b5497 native: Add command line options to control real timeness
- ab81d2c7 arch: arm: block ARM_MPU K-option in Cortex-M0
- 7b56b448 arch: arm: accelerate _get_num_regions() for Cortex-M0+, M3, and M4
- dbede45d arch: arm: improve inline comment in _arm_mpu_config/enable
- 61439b01 arch: arm: remove redundant flag
- 41070c3b arch/arm: Fix locking in __pendsv
- 8c53f242 arch: arm: set VECTOR_ADDRESS to _vector_start
- 28007296 arch/stm32: remove irq definition files
- 3a87e0ed native: Fix entropy generator kconfig warning
- ebbb744b native: Fix host BT driver kconfig warning
- 070c1ae0 soc: nRF52x: Add Kconfig options to enable DC/DC converter
- f177fb88 arch: arc: Fix reference to removed NSIM Kconfig symbol
- 77643677 esp32: update to ESP-IDF v3.0-dev-2648-gb2ff235b
- 31aa9b9a arch: arm: atmel_sam: Use a single RAM region when possible
- e86c53b4 arch: arm: atmel_sam: Map the whole RAM in MPU
- bb55155d arch: arm: core: cortex_m: add a barrier before the dummy
FP instruction
- 158ea44e arch: arm: improve help text for ARM_SECURE_FIRMWARE
- dd640f14 arch: arm: introduce ARM_NONSECURE_FIRMWARE option
- 13dc3762 arch: arm: introduce ARMV8_M_SE option
- 0a2dcaaf arch: arm: introduce dependencies for CPU_CORTEX_M_HAS_SPLIM option
- f630559e arch: arm: Define and implement API for test target (Secure)
- d426adcc arch: arm: refactor function to align with the adopted api
- 87936612 arch: arm: implement cmse address range check (secure)
- fe3cd4c8 arch: arm: convenience wrappers for C variable Non-Secure permissions
- 7a864bb7 arch: arm: define and implement ARM IRQ target state API

Bluetooth (25):

- c3edc82f Bluetooth: GATT: Allow Characterist to be used with bt_gatt_notify
- 679a0b39 Bluetooth: GATT: Allow Characterist to be used with bt_gatt_indicate
- 68de9d5d Bluetooth: Use Characteristic attribute whenever possible
- 7d989657 Bluetooth: Add HCI User Channel driver for native POSIX port
- ea5b8667 Bluetooth: hci: spi: Select BT_RECV_IS_RX_THREAD
- edb2ad11 Bluetooth: controller: Remove redundant include of cmsis.h
- dc95e1ba Bluetooth: controller: Add Tx Power Kconfig option
- 362a6b34 Bluetooth: controller: Fix to use max. tx power in DTM test mode
- bb4ed94c bluetooth: tester: Increase system workqueue stack size
- e1b77247 Bluetooth: GATT: Fix notifications
- b1b10171 Bluetooth: Export HCI command APIs through public hci.h header file
- b20aff2f Bluetooth: Introduce HCI driver quirks
- 660c5c92 Bluetooth: controller: Remove include guards in internal files
- 37e6162c bluetooth: tester: Fix bt_gatt_service_register call with
invalid params
- 3904442e bluetooth: tester: Remove redundant config option from qemu.conf
- aa190cd5 bluetooth: tester: Set configuration file for qemu_cortex_m3 target
- 48b7f236 Bluetooth: Fix assertion condition in bt_gatt_discover
- bc606d22 Bluetooth: controller: Use nRFx functions for RTC reg with
sideeffects
- 347f3262 Bluetooth: controller: Use nRFx functions for ECB reg with sideeffect
- 17429725 Bluetooth: controller: Use SOC series macro instead of board macro
- 5f146e49 Bluetooth: controller: Use SOC series macro instead of the
board macro
- 88f0fbdc Bluetooth: controller: Use nRFx functions for RTC reg w sideeffects
- 1c5bb494 Bluetooth: controller: Use nRFx functions for CCM reg w sideeffects
- c97645c8 Bluetooth: controller: Use nRFx functions for TIMER reg w sideeffects
- 15ae4fa3 Bluetooth: controller: Use nRFx functions for PPI reg with sideef

Boards (5):

- fb3aedde boards: lpcxpresso54114_m0: do not set as default
- a58043e1 boards: cc3220sf_launchxl: Restore removal of CONFIG_XIP setting
- 558eac2f boards: arm: stm32: Added pwm to supported list
- 2055b84f boards: frdm_kl25z: add USB support
- 74c44b29 boards: arm: nrf52840: default IEEE802154_NRF5 if IEEE802154 enabled

Build (14):

- d94231f6 cmake: libc: minimal: Move sources from 'app' to a new CMake library
- 025a1e90 cmake: fix CONF_FILE parsing to allow for cmake lists
- ee9af86f cmake: Improve user error feedback when -H$ZEPHYR_BASE is specified
- a74e80fa cmake: Removing the need for always rebuild
- f38e388a cmake: Update to dependency handling for syscalls.json
- 8f3fea30 cmake: bluetooth: Don't #include gatt files from src files
- 7f5203d3 kconfig: Remove UART_QMSI_{0,1}_NAME Kconfig reference
- 2e0af08e build: remove unused CMakeLists.txt
- d62117e5 kconfig: Change how BT affects SYSTEM_WORKQUEUE_PRIORITY
- b35a41f9 include: linker: add sections for USB device stack
- 5bfc7ff2 kconfig: Fail in CI if Kconfig files reference undefined symbols
- 92a6898b cmake: allow multiple compiler options
- e8413d18 kconfig: add a compiler speed optimization
- 3c1a78ea cmake: replace PROJECT_SOURCE_DIR with ZEPHYR_BASE

Continuous Integration (2):

- 33fa63e4 sanitycheck: Add progress to verbose mode
- 5dce5ea5 ci: user latest docker file

Device Tree (11):

- e5b0e9ac DTS: interrupt controller: Define IRQ priorities for CAVS & DW ICTL
- 4ec773f2 DTS: intel_s1000: Clean up I2C and UART stuff from soc.h
- 71e66f06 dts: stm32: Add Timer and PWM binding
- 0e8d97f1 dts: stm32f0: Add PWM nodes
- da0caab3 dts: stm32f1: Add PWM nodes
- bfa1941e dts: stm32f3: Add PWM nodes
- 7a60a2c4 dts: stm32f4: Add PWM nodes
- c7d2dc23 dts: stm32l4: Add PWM nodes
- 5c6ccf4a dts: stm32: Enable PWM nodes on selected boards
- b7c4c030 dts: riscv32: riscv32-qemu: Add device tree support
- 0824ec64 dt: nrf52840: remove 0x from USBD address

Documentation (12):

- 5917f9b6 doc: Makefile: Remove CONFIG_SHELL assignment
- 953dfe75 doc: Makefile: Remove the 'doxy-code' target
- fa121da1 doc: Makefile: Remove the 'prep' target
- 9af9b1fb doc: Makefile: Lowercase internal Make variables
- a760c5b0 doc: Makefile: Remove latex_paper_size (PAPER) option
- 4dcf928a doc: fix doxygen error for device.h macros
- 92f146ea doc: update application docs wrt CONF_FILE
- ef75956d doc: update known-issues filter
- f5e38130 docs: Fix mailbox k_mbox_msg.tx_block documentation
- d901add4 doc: update .gitignore file list
- a3d83ec9 doc: update doc build tools documentation
- de6d61d1 doc: remove local copy of jquery.js

Drivers (59):

- e16037d8 drivers: sensor: lis2dh: Fix of compilation issue
- 87bd2c25 drivers: sensor: lis2dh: Fix I2C burst read/write operations
- e7206318 drivers: eth: mcux: Inform IP stack when carrier is lost
- 51fecf80 usb: bluetooth: Add TX thread
- 00a6b4c5 usb: bluetooth: Fix assert due to unreserved headroom
- 452cb618 usb: bluetooth: Use transfer API for ACL packets
- 1ce6a6ea subsys: usb: update bcdUSB to 2.00
- 7b7784e1 drivers: dma_cavs: Add support for circular list
- 3f3a907b drivers: timer: Use sys_clock_hw_cycles_per_tick in nrf_rtc_timer.
- c524ff6b subsys: console: getchar: Use consistent var names for RX path
- 0bdcef9e pwm: stm32: Use macro to simplify registration
- f34e74db pwm: stm32: Add support for all PWMs up to PWM20
- 20365bac pwm: stm32: Do not hardcode the prescalers
- c65499d4 pwm: stm32: Add clock group information
- 07908748 pwm: stm32: Add STM32F0-specific clocks
- bef42fad pwm: stm32: Fix driver to compile with STM32F0
- 18f24f08 pinmux: stm32f3: Add PA8_PWM1_CH1
- 653d75cf pwm: stm32: Add PWM fixup for STM32* and remove Kconfig options
- e7252fbb drivers: uart: Refactor nrf uart shim
- 3f99eefe drivers: uart: Rename nrf5 namings to nrfx
- 1f22a418 gpio: doc: Be explicit about how EDGE and DOUBLE_EDGE work together
- 1002e904 drivers/exti: stm32: Use CMSIS IRQ defines instead of zephyr
- d84795b0 drivers/dma: stm32: Use CMSIS IRQ defines instead of zephyr
- f5310d5b drivers: pwm: pwm_nrf5_sw: Fix calculation of cycles per second
- fc1898cc drivers: pwm: pwm_nrf5_sw: Add prescaler support
- 2e6386f5 drivers: ieee802154: Remove GPIO_MCUX_PORT{A,B}_NAME
Kconfig references
- 02b5f3ed drivers: gpio: Fix GPIO_QMSI_{0,1}_NAME Kconfig references
- 2a834995 drivers: sensors: Consistently quote "GPIO_0" string default
- 8df42eb4 drivers: Replace ff hex constants with 0xff
- a55c72d3 subsys: usb/class/hid: make interrupt endpoint size configurable
- 6c60abb0 drivers: gpio: add dts support for nrf52 gpio
- 2fe51996 drivers/flash: Remove irrelevant option in w25qxxdv driver
- cf14a60f include: usb: add descriptor and data section macros
- 0fca1644 subsys: usb: rework usb string descriptor fixup
- 589dbc4c subsys: usb: add function to find and fix USB descriptors
- 6807f3a8 subsys: usb: move descriptor parts to the class drivers
- 7c708604 include: driver: usb: add check for endpoint capabilities
- 52eacf16 driver: usb: add check for endpoint capabilities
- 18b27b7f subsys: usb: fetch endpoint address from usb_ep_cfg_data
- bf332d00 subsys: usb: validate and update endpoint address
- 12375490 subsys: usb: configure Interface descriptor at runtime
- 1383dad8 subsys: usb: rework composite device support
- 32cac08e usb: class: adapt functions for new composite interface
- 391cf424 usb: tests: Add missing sections to sanitycheck
- 085a8b75 usb: hid: fix write to interrupt IN endpoint
- 408ea146 drivers: flash: nrf: Avoid locking when not threaded
- 49554dd3 drivers: usb_dc_stm32: Change SYS_LOG_LEVEL
- 785faea8 drivers: timer: nRFx: Use nrf_rtc hal for registers w sideeffects
- 53220198 drivers: clock_control: Use nrf_clock HAL for registers w sideeffects
- 78bf7518 drivers: entropy: nrf5: Use nrf_rng hal for registers w sideeffects
- 88de5bd8 drivers: serial: Remove SOC_NRF52810 Kconfig reference
- 392da5ba drivers: flash: w25qxxdv: Avoid locking when not threaded
- fc4fc655 drivers: serial: Revert change to init level for nrfx uart driver.
- 03f2eb7f stm32_pwm: add pinmux port definition for pwm4
- 80b8c501 drivers/serial: stm32: simplify check of TEACK/REACK flags
- 13a96574 drivers/serial: stm32: Put LPUART code under LPUART Kconfig symbol
- ebc31f62 drivers: can: Prepare STM32 driver for other series than STM32F0
- c601f3be can: Add can support for STM32L432
- 7688f490 drivers: usb_dc_stm32: change all endpoints to bidirectional

External (3):

- 4db7cce0 ext: lib: mgmt: Remove MDLOG Kconfig reference
- 354c8222 ext: hal: nordic: Update nrfx to version 1.1.0
- fb6f9b78 ext: Kconfig: Remove redundant 'default n' properties

Kernel (5):

- fd559355 kernel: work_q: Document implications of default sys work_q priority
- b173e435 kernel/queue: Fix spurious NULL exit condition when using timeouts
- 55a7e46b kernel/poll: Remove POLLING thread state bit
- 2e405fbc native_posix & kernel: Remove legacy preemption checking
- 3d14615f kernel: Restore CONFIG_MULTITHREADING=n behavior

Libraries (2):

- 99cef4c6 lib: Fix malformed JSON_LIBARY Kconfig default
- 6245d6c4 libc: minimal: Add typedefs for "least" types

Miscellaneous (3):

- 0f9a6426 release: Post-release patch level update
- 5890004e release: 1.12 doc cleanup
- c16bce7a samples, subsys, tests: Use ARRAY_SIZE() whenever possible

Networking (27):

- c0109fd6 net/ethernet: There is no need to fill in the header in all frags
- 9e0cfaf0 net/arp: There is no need to fill in the header in all frags
- 06fbcb1c net/arp: Removing header filling duplicate
- 97699537 net/arp: Clear cache per-iface when relevant
- a999d53a net/icmpv6: Removing duplicate checksum calculation
- d4e0a687 net/pkt: Simplify a tiny bit how TC priority is set
- e1c11499 net/pkt: Use IS_ENABLED instead of ifdef
- eb3ecf6e net: shell: conn: Always show TCP state
- 3122112a net: ethernet: Provide stubs for ethernet carrier functions
- b93d29df net: ethernet: Add carrier detection to L2
- fa882418 net: dhcpv4: Fix IPv4 and UDP checksum calculation
- 5cda31c8 net: dhcpv4: Detect network interface on/off events
- 4dd61f88 net: tcp: Process zero window probes when our recv_wnd == 0
- 3cf1b07d net: stats: do not use deallocated packet pointer
- 30c4aae9 net: samples: increase main stack size for echo_client
- d4943989 net: stats: handle_na_input: unref packet after stats are updated
- ce6f9819 net: Remove redundant NETWORKING dependency
- 1a96f2b4 net: ethernet: Show interface for dropped RX packet
- 4ae875f9 net: arp: Timeout too long ARP request
- 699023a9 net: ethernet: Fix asserts in net_eth_fill_header()
- e62972bb net: ethernet: net_eth_fill_header: Remove superfluous "frag" param
- 268c0e33 net: tcp: Add MSS option on sending SYN request
- f8dc4b6b net: bluetooth: Enforce the minimum user_data size at Kconfig
- c0e0d613 net: rpl: Fix malformed Kconfig default
- 3bc77e88 net: drivers: wifi: SimpleLink WiFi Offload Driver (wifi_mgmt only)
- 7934e249 net: lwm2m: retry registration update 6 seconds before expiration
- 1da4ddba net: pkt: Fix comment typo in word tailroom

Samples (12):

- 57f67903 samples: can: move CAN sample under drivers
- 3f8352f2 samples: remove sample.tc
- f37287bb samples: cleanup sample test naming
- 10d8e711 samples: move grove samples to sensors and display
- 59309c1a samples: sockets: dumb_http_server: Use consistent logging settings
- fb4227bd samples: mbedtls_sslclient: Use entropy driver to kickstart RNG
- 416614e2 samples: net: echo-client: Increase buf count for frdm-k64f
- 7a073bf9 samples: bluetooth: Fix microbit/nrf5 UART flow control assignments
- e5b5f85c samples: servo_motor: Add support for the BBC micro:bit
- 1bbfdf1d samples: mesh/onoff-app: Enable persistent storage support
- 98465702 samples: net: wifi: Add a cc3220sf_launchxl conf file
- af70e8f7 samples: net: Check the return value of close()

Scripts (11):

- cb95ea0b kconfiglib: Update to add list of choices
- 31ab6bff genrest: Generate documentation and links for choices
- 20721f39 scripts: kconfig: Improve the 'user value != actual value' warning
- ad29ec69 scripts: extract: globals.py: fix node name when it includes "@"
- f971aaca scripts: kconfig: Turn most warnings into errors
- 7f84001f menuconfig: Fix searching for nonexistent objects
- f425c0aa scripts: kconfig: Disable the "FOO set more than once" warning
- 59c8ae8c kconfiglib: Fix incorrectly ordered props. for some multi.def symbols
- ea108107 scripts: kconfig: Extend the assignment-failed warning
- 80f19cca kconfiglib: Correctly report choice locations in some warnings
- 4dcde2e6 menuconfig: Allow searches from the info dialog and vice versa

Storage (1):

- 72959543 settings: fix typo in header file

Testing (8):

- 9b2880fe tests: posix: fix meta-data and rename test file
- 252be0b9 tests/kernel/sched/preempt: enable test for native_posix
- e8a906c2 tests: disable preempt testcase for native_posix
- 4a2d109a native tests: fix kernel sched preempt for arch posix
- 791daa70 tests: sprintf: remove kconfig options
- 072a43d1 tests: Do not build arm_irq_vector_table .config's for ARC
- 7bbd3a79 tests/kernel: Add a test for CONFIG_MULTITHREADING=n
- a3fe7af2 tests: obj_tracing: Enhance object counter logic


Were to send patches & Looking for a example for ADC and DFSDM for the stm32f4

Stefan Jaritz
 

Hej

I still playing a bit around with Zephyr OS.

I manged so far to setup the UART1 using PA10 & PA15. This config is not included. I can submit a patch. Who is maintaining the stm32 dts?

Now I want to go one step further. I would like to use the ADC and the DFSDM module of the stm32f4. I was checking the sample section. I only found the "grove_temperature" as an ADC sample. But for me it still remains unclear how to do ADC in Zephyr OS from the scratch.


Maybe someone can explain it to me at an example:

1) ADC

My "simple" problem is to read the PC1(ADC Channel 11), PC3(ADC Channel 13) and VRefInt. I created my own board. I would like to know all the necessary steps to finally read in my main.c a value from the ADC :D

Think to solve this I need to add some lines at

pinmux.c

myBoard.dts

myBoard_defconfig

main.c

2nd) DFSDM

The stm32f4 MCU contains a DFSDM interface. I like to use it to read microphone data. Are there people who tried to do this in zephyr? What were the steps? Is there a DFSDM driver?

Kind regards!

Stefan


Re: I am not able to read messages sent by nordic to nrf Connect app using the UART services UUID #ble #nrf52832 #bluetoothmesh

Carles Cufi
 

Hi there,

 

Zephyr doesn’t support the “Nordic UART Service”. That is a proprietary service that is only implemented in the Nordic SDK.

It should be quite simple to implement using the Zephyr Bluetooth APIs though, so feel free to give it a go!

 

Carles

 

 

From: users@... <users@...> On Behalf Of Rajat Kalyan
Sent: 19 June 2018 06:07
To: users@...
Subject: [Zephyr-users] I am not able to read messages sent by nordic to nrf Connect app using the UART services UUID #bluetoothmesh #ble #nrf52832

 

Hi Everyone,

I am able to connect my nordic microcontroller to my bluetooth by making a few changes in the UUID and some parameter in the beacon sample code given in the zephyr example codes.
But i am not able to read the messages sent on the UART service.
As soon as i open the nrf toolbox and click on the UART choice in the app.
The app connects to the nordic bluetooth but disconnects immediately and says,"Device does not have required services" .

Kindly help me out of this

Thanks 
Rajat


I am not able to read messages sent by nordic to nrf Connect app using the UART services UUID #ble #nrf52832 #bluetoothmesh

Rajat Kalyan
 

Hi Everyone,

I am able to connect my nordic microcontroller to my bluetooth by making a few changes in the UUID and some parameter in the beacon sample code given in the zephyr example codes.
But i am not able to read the messages sent on the UART service.
As soon as i open the nrf toolbox and click on the UART choice in the app.
The app connects to the nordic bluetooth but disconnects immediately and says,"Device does not have required services" .

Kindly help me out of this

Thanks 
Rajat


Re: k_sleep on mimxrt1050_evk board

Maureen Helm
 

Hi Marco,

This board has two versions, EVK and EVKB, which correspond to different revisions of silicon (A0 and A1, respectively). The EVK board works just fine, but I was able to reproduce the issue on the EVKB board. There does appear to be a problem with the timer, but I’m still investigating.

 

Please go ahead and file a bug so we can track it.

 

Maureen

 

From: users@... [mailto:users@...] On Behalf Of marco.hoefle@...
Sent: Friday, June 15, 2018 12:48 AM
To: users@...
Subject: Re: [Zephyr-users] k_sleep on mimxrt1050_evk board

 

Hello Anas,
I will, I just let Maureen have a look first just in case I need to add something to the kernel config or I am doing something wrong.
Marco


Re: Bluetooth mesh provisionning got stuck #bluetoothmesh #nrf52840

Rodrigo Peixoto
 

Hey, guys sorry for the delay.

Vikrant, I cannot even provision it for the first time I try.

Johan, yes I have the CONFIG_BT_TINYCRYPT_ECC=y in my conf file. 

Is there anything I can show you to give more details? 

I could not solve this yet.



Best regards,
Rodrigo Peixoto
Co-founder and Technical advisor

+55 (82) 98144-8585
http://ayna.tech | Skype: rodrigopex




Re: Bluetooth mesh provisionning got stuck #bluetoothmesh #nrf52840

Johan Hedberg
 

Hi Rodrigo,

On Fri, Jun 15, 2018, Rodrigo Peixoto wrote:
[bt] [DBG] bt_mesh_pb_gatt_open: (0x200026fc) conn 0x2000085c
[bt] [DBG] bt_mesh_pb_gatt_recv: (0x200026fc) 2 bytes: 0000
[bt] [DBG] prov_invite: (0x200026fc) Attention Duration: 0 seconds
[bt] [DBG] bt_mesh_pb_gatt_recv: (0x200026fc) 6 bytes: 020000020304
[bt] [DBG] prov_start: (0x200026fc) Algorithm: 0x00
[bt] [DBG] prov_start: (0x200026fc) Public Key: 0x00
[bt] [DBG] prov_start: (0x200026fc) Auth Method: 0x02
[bt] [DBG] prov_start: (0x200026fc) Auth Action: 0x03
[bt] [DBG] prov_start: (0x200026fc) Auth Size: 0x04
[BLUETOOTH] [DBG] output_number: OOB Number: 1224 <-- this line is
printed by my code
[bt] [DBG] bt_mesh_pb_gatt_recv: (0x200026fc) 65 bytes:
03d5287e2bd8d07a6b5346d103737dbbf8085f008e13e5586ebc453dcab8fc66d3bf5830f6e6e9935dc175d679bbe2cf2d1d356d83fe560e750a742c179803c9
[bt] [DBG] prov_pub_key: (0x200026fc) Remote Public Key:
d5287e2bd8d07a6b5346d103737dbbf8085f008e13e5586ebc453dcab8fc66d3bf5830f6e6e9935dc175d679bbe2cf2d1d356d83fe560e750a742c179803c990
[bt] [DBG] prov_clear_tx: (0x200026fc)
[bt] [WRN] prov_pub_key: Waiting for local public key

It stops right here...
Do you have CONFIG_BT_TINYCRYPT_ECC=y in your configuration?

Johan


Re: Bluetooth mesh provisionning got stuck #bluetoothmesh #nrf52840

vikrant8051 <vikrant8051@...>
 

Hi Rodrigo,

Can you access Models after following these steps ?

Provisioning & Configuration of Models -> un-provisioning (using reset node option in #nRFMesh) -> re-provisioning & re-configuration of Models -> reset / power reset the circuit
-> reconnect to same proxy node -> And try to access Models (means try to control LED associate with Gen. OnOff Server)

Thank You !!

On Sat, Jun 16, 2018 at 2:59 AM, Rodrigo Peixoto <rodrigopex@...> wrote:
Hi guys.


Board: nrf52840_pca10056
Zephyr version: 1.12.0

I am trying to add the mesh feature to my project. I am using a nrf52840_10056pca board, and I'm adding the samples/bluetooth/mesh code to project. 

In this project I have running console shell, mcumgr, PWM, SAADC, thermometer, Bluetooth mesh. Everything is compiling and is working properly. But I am getting stuck when I try to provision the device to enter to the Bluetooth mesh network.

The log for the provision when I press the button provision on the Nordic Mesh app for iOS:

    [bt] [DBG] bt_mesh_pb_gatt_open: (0x200026fc) conn 0x2000085c
    [bt] [DBG] bt_mesh_pb_gatt_recv: (0x200026fc) 2 bytes: 0000
    [bt] [DBG] prov_invite: (0x200026fc) Attention Duration: 0 seconds
    [bt] [DBG] bt_mesh_pb_gatt_recv: (0x200026fc) 6 bytes: 020000020304
    [bt] [DBG] prov_start: (0x200026fc) Algorithm:   0x00
    [bt] [DBG] prov_start: (0x200026fc) Public Key:  0x00
    [bt] [DBG] prov_start: (0x200026fc) Auth Method: 0x02
    [bt] [DBG] prov_start: (0x200026fc) Auth Action: 0x03
    [bt] [DBG] prov_start: (0x200026fc) Auth Size:   0x04
    [BLUETOOTH] [DBG] output_number: OOB Number: 1224  <-- this line is printed by my code
    [bt] [DBG] bt_mesh_pb_gatt_recv: (0x200026fc) 65 bytes: 03d5287e2bd8d07a6b5346d103737dbbf8085f008e13e5586ebc453dcab8fc66d3bf5830f6e6e9935dc175d679bbe2cf2d1d356d83fe560e750a742c179803c9
    [bt] [DBG] prov_pub_key: (0x200026fc) Remote Public Key: d5287e2bd8d07a6b5346d103737dbbf8085f008e13e5586ebc453dcab8fc66d3bf5830f6e6e9935dc175d679bbe2cf2d1d356d83fe560e750a742c179803c990
    [bt] [DBG] prov_clear_tx: (0x200026fc) 
    [bt] [WRN] prov_pub_key: Waiting for local public key

It stops right here...

Any clue on that? I have no idea what to do. When I run the sample separately it is being provisioned. I have already removed the OTA, and other features but nothing seems to fix that.

I hope you can help me.


Best regards,
Rodrigo Peixoto
Co-founder and Technical advisor

+55 (82) 98144-8585
http://ayna.tech | Skype: rodrigopex




Bluetooth mesh provisionning got stuck #bluetoothmesh #nrf52840

Rodrigo Peixoto
 

Hi guys.


Board: nrf52840_pca10056
Zephyr version: 1.12.0

I am trying to add the mesh feature to my project. I am using a nrf52840_10056pca board, and I'm adding the samples/bluetooth/mesh code to project. 

In this project I have running console shell, mcumgr, PWM, SAADC, thermometer, Bluetooth mesh. Everything is compiling and is working properly. But I am getting stuck when I try to provision the device to enter to the Bluetooth mesh network.

The log for the provision when I press the button provision on the Nordic Mesh app for iOS:

    [bt] [DBG] bt_mesh_pb_gatt_open: (0x200026fc) conn 0x2000085c
    [bt] [DBG] bt_mesh_pb_gatt_recv: (0x200026fc) 2 bytes: 0000
    [bt] [DBG] prov_invite: (0x200026fc) Attention Duration: 0 seconds
    [bt] [DBG] bt_mesh_pb_gatt_recv: (0x200026fc) 6 bytes: 020000020304
    [bt] [DBG] prov_start: (0x200026fc) Algorithm:   0x00
    [bt] [DBG] prov_start: (0x200026fc) Public Key:  0x00
    [bt] [DBG] prov_start: (0x200026fc) Auth Method: 0x02
    [bt] [DBG] prov_start: (0x200026fc) Auth Action: 0x03
    [bt] [DBG] prov_start: (0x200026fc) Auth Size:   0x04
    [BLUETOOTH] [DBG] output_number: OOB Number: 1224  <-- this line is printed by my code
    [bt] [DBG] bt_mesh_pb_gatt_recv: (0x200026fc) 65 bytes: 03d5287e2bd8d07a6b5346d103737dbbf8085f008e13e5586ebc453dcab8fc66d3bf5830f6e6e9935dc175d679bbe2cf2d1d356d83fe560e750a742c179803c9
    [bt] [DBG] prov_pub_key: (0x200026fc) Remote Public Key: d5287e2bd8d07a6b5346d103737dbbf8085f008e13e5586ebc453dcab8fc66d3bf5830f6e6e9935dc175d679bbe2cf2d1d356d83fe560e750a742c179803c990
    [bt] [DBG] prov_clear_tx: (0x200026fc) 
    [bt] [WRN] prov_pub_key: Waiting for local public key

It stops right here...

Any clue on that? I have no idea what to do. When I run the sample separately it is being provisioned. I have already removed the OTA, and other features but nothing seems to fix that.

I hope you can help me.


Best regards,
Rodrigo Peixoto
Co-founder and Technical advisor

+55 (82) 98144-8585
http://ayna.tech | Skype: rodrigopex



Re: k_sleep on mimxrt1050_evk board

marco.hoefle@...
 

Hello Anas,
I will, I just let Maureen have a look first just in case I need to add something to the kernel config or I am doing something wrong.
Marco


Re: k_sleep on mimxrt1050_evk board

marco.hoefle@...
 

Hello Maureen,
Sure, I tried blinky and synchronisation.
Both didn't work.

Here the detailed steps:

marco@L-xx:~/projects/misc/zephyr/samples/basic/blinky/build$ export ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk/
marco@L-xx:~/projects/misc/zephyr/samples/basic/blinky/build$ export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
marco@L-xx:~/projects/misc/zephyr/samples/basic/blinky/build$ source ~/projects/misc/zephyr/zephyr-env.sh
marco@L-xx:~/projects/misc/zephyr/samples/basic/blinky/build$ cmake -DBOARD=mimxrt1050_evk ..
CMake Deprecation Warning at /home/marco/projects/misc/zephyr/cmake/app/boilerplate.cmake:38 (cmake_policy):
  The OLD behavior for policy CMP0000 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:1 (include)


-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.5", minimum required is "3.4")
-- Selected BOARD mimxrt1050_evk
Zephyr version: 1.12.0
Parsing Kconfig tree in /home/marco/projects/misc/zephyr/Kconfig
Using /home/marco/projects/misc/zephyr/boards/arm/mimxrt1050_evk/mimxrt1050_evk_defconfig as base
Merging /home/marco/projects/misc/zephyr/samples/basic/blinky/prj.conf
/home/marco/projects/misc/zephyr/samples/basic/blinky/prj.conf:1: warning: GPIO (defined at drivers/gpio/Kconfig:9, /home/marco/projects/misc/zephyr/arch/arm/soc/nordic_nrf/Kconfig.defconfig:15, arch/arm/soc/nxp_imx/mcimx7_m4/Kconfig.defconfig.mcimx7_m4:29, /home/marco/projects/misc/zephyr/arch/arm/soc/nxp_imx/rt/Kconfig.defconfig.mimxrt1052:30, /home/marco/projects/misc/zephyr/arch/arm/soc/nxp_kinetis/k6x/Kconfig.defconfig.mk64f12:36, /home/marco/projects/misc/zephyr/arch/arm/soc/nxp_lpc/lpc54xxx/Kconfig.defconfig.lpc54114_m0:22, /home/marco/projects/misc/zephyr/arch/arm/soc/silabs_exx32/efm32wg/Kconfig.defconfig.efm32wg:15) set more than once. Old value: "y", new value: "y".
/home/marco/projects/misc/zephyr/samples/basic/blinky/prj.conf:2: warning: SERIAL (defined at drivers/serial/Kconfig:9) set more than once. Old value: "y", new value: "n".
warning: OSC_EXTERNAL (defined at /home/marco/projects/misc/zephyr/arch/arm/soc/nxp_kinetis/Kconfig:57) was assigned the value "y" but got the value "n" -- check dependencies
warning: UART_CONSOLE (defined at drivers/console/Kconfig:40) was assigned the value "y" but got the value "n" -- check dependencies
-- Generating zephyr/include/generated/generated_dts_board.h
mimxrt1050_evk.dts_compiled: Warning (unit_address_vs_reg): Node /leds/led@0 has a unit name, but no reg property
mimxrt1050_evk.dts_compiled: Warning (unit_address_vs_reg): Node /gpio_keys/button@0 has a unit name, but no reg property
-- Cache files will be written to: /home/marco/.cache/zephyr
-- The C compiler identification is GNU 6.2.0
-- The CXX compiler identification is GNU 6.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-gcc
-- Performing Test toolchain_is_ok
-- Performing Test toolchain_is_ok - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/marco/projects/misc/zephyr/samples/basic/blinky/build
marco@L-xx:~/projects/misc/zephyr/samples/basic/blinky/build$ make
Scanning dependencies of target kobj_types_h_target
[  1%] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h
[  1%] Built target kobj_types_h_target
Scanning dependencies of target syscall_macros_h_target
[  2%] Generating include/generated/syscall_macros.h
[  2%] Built target syscall_macros_h_target
Scanning dependencies of target syscall_list_h_target
[  3%] Generating always_rebuild
Building for board mimxrt1050_evk
[  4%] Generating misc/generated/syscalls.json
[  5%] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
[  5%] Built target syscall_list_h_target
Scanning dependencies of target driver_validation_h_target
[  6%] Generating include/generated/driver-validation.h
[  6%] Built target driver_validation_h_target
Scanning dependencies of target offsets
[  7%] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
[  8%] Linking C static library liboffsets.a
[  8%] Built target offsets
Scanning dependencies of target offsets_h
[  9%] Generating include/generated/offsets.h
[  9%] Built target offsets_h
Scanning dependencies of target app
[ 10%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/stdlib/atoi.c.obj
[ 11%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/stdlib/strtol.c.obj
[ 12%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/stdlib/strtoul.c.obj
[ 13%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/string/strncasecmp.c.obj
[ 14%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/string/strstr.c.obj
[ 15%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/string/string.c.obj
[ 16%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/stdout/prf.c.obj
[ 17%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/stdout/stdout_console.c.obj
[ 18%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/stdout/sprintf.c.obj
[ 19%] Building C object CMakeFiles/app.dir/home/marco/projects/misc/zephyr/lib/libc/minimal/source/stdout/fprintf.c.obj
[ 20%] Building C object CMakeFiles/app.dir/src/main.c.obj
[ 21%] Linking C static library libapp.a
[ 21%] Built target app
Scanning dependencies of target kernel
[ 22%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/alert.c.obj
[ 23%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/device.c.obj
[ 24%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/errno.c.obj
[ 25%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/idle.c.obj
[ 26%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/init.c.obj
[ 27%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mailbox.c.obj
[ 28%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mem_slab.c.obj
[ 29%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mempool.c.obj
[ 30%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/msg_q.c.obj
[ 31%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mutex.c.obj
[ 32%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/pipes.c.obj
[ 34%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/queue.c.obj
[ 35%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sched.c.obj
[ 36%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sem.c.obj
[ 37%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/stack.c.obj
[ 38%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sys_clock.c.obj
[ 39%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/system_work_q.c.obj
[ 40%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/thread.c.obj
[ 41%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/thread_abort.c.obj
[ 42%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/version.c.obj
[ 43%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/work_q.c.obj
[ 44%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/smp.c.obj
[ 45%] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timer.c.obj
[ 46%] Linking C static library libkernel.a
[ 46%] Built target kernel
Scanning dependencies of target linker_script
[ 47%] Generating linker.cmd
[ 47%] Built target linker_script
Scanning dependencies of target zephyr
[ 48%] Building C object zephyr/CMakeFiles/zephyr.dir/arch/common/isr_tables.c.obj
[ 49%] Building C object zephyr/CMakeFiles/zephyr.dir/arch/arm/soc/nxp_imx/rt/soc.c.obj
[ 50%] Building C object zephyr/CMakeFiles/zephyr.dir/arch/arm/soc/nxp_imx/rt/arm_mpu_regions.c.obj
[ 51%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/thread_entry.c.obj
[ 52%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/crc/crc16_sw.c.obj
[ 53%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/crc/crc8_sw.c.obj
[ 54%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/mempool/mempool.c.obj
[ 55%] Building C object zephyr/CMakeFiles/zephyr.dir/lib/rbtree/rb.c.obj
[ 56%] Building C object zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj
[ 57%] Building C object zephyr/CMakeFiles/zephyr.dir/ext/hal/nxp/mcux/devices/MIMXRT1052/fsl_clock.c.obj
[ 58%] Building C object zephyr/CMakeFiles/zephyr.dir/ext/hal/nxp/mcux/drivers/imx/fsl_gpio.c.obj
[ 59%] Building C object zephyr/CMakeFiles/zephyr.dir/drivers/clock_control/clock_control_mcux_ccm.c.obj
[ 60%] Building C object zephyr/CMakeFiles/zephyr.dir/drivers/timer/sys_clock_init.c.obj
[ 61%] Building C object zephyr/CMakeFiles/zephyr.dir/drivers/timer/cortex_m_systick.c.obj
[ 62%] Linking C static library libzephyr.a
[ 62%] Built target zephyr
Scanning dependencies of target arch__arm__core
[ 63%] Building ASM object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/exc_exit.S.obj
[ 64%] Building C object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/irq_init.c.obj
[ 65%] Building C object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/swap.c.obj
[ 67%] Building ASM object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/swap_helper.S.obj
[ 68%] Building C object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/fault.c.obj
[ 69%] Building C object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/irq_manage.c.obj
[ 70%] Building C object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/thread.c.obj
[ 71%] Building ASM object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/cpu_idle.S.obj
[ 72%] Building ASM object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/fault_s.S.obj
[ 73%] Building C object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/fatal.c.obj
[ 74%] Building C object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/sys_fatal_error_handler.c.obj
[ 75%] Building C object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/thread_abort.c.obj
[ 76%] Building ASM object zephyr/arch/arm/core/CMakeFiles/arch__arm__core.dir/isr_wrapper.S.obj
[ 77%] Linking C static library libarch__arm__core.a
[ 77%] Built target arch__arm__core
Scanning dependencies of target arch__arm__core__cortex_m
[ 78%] Building ASM object zephyr/arch/arm/core/cortex_m/CMakeFiles/arch__arm__core__cortex_m.dir/vector_table.S.obj
[ 79%] Building ASM object zephyr/arch/arm/core/cortex_m/CMakeFiles/arch__arm__core__cortex_m.dir/reset.S.obj
[ 80%] Building ASM object zephyr/arch/arm/core/cortex_m/CMakeFiles/arch__arm__core__cortex_m.dir/nmi_on_reset.S.obj
[ 81%] Building C object zephyr/arch/arm/core/cortex_m/CMakeFiles/arch__arm__core__cortex_m.dir/prep_c.c.obj
[ 82%] Building C object zephyr/arch/arm/core/cortex_m/CMakeFiles/arch__arm__core__cortex_m.dir/scb.c.obj
[ 83%] Building C object zephyr/arch/arm/core/cortex_m/CMakeFiles/arch__arm__core__cortex_m.dir/nmi.c.obj
[ 84%] Building C object zephyr/arch/arm/core/cortex_m/CMakeFiles/arch__arm__core__cortex_m.dir/exc_manage.c.obj
[ 85%] Linking C static library libarch__arm__core__cortex_m.a
[ 85%] Built target arch__arm__core__cortex_m
Scanning dependencies of target arch__arm__core__cortex_m__mpu
[ 86%] Building C object zephyr/arch/arm/core/cortex_m/mpu/CMakeFiles/arch__arm__core__cortex_m__mpu.dir/arm_core_mpu.c.obj
[ 87%] Building C object zephyr/arch/arm/core/cortex_m/mpu/CMakeFiles/arch__arm__core__cortex_m__mpu.dir/arm_mpu.c.obj
[ 88%] Linking C static library libarch__arm__core__cortex_m__mpu.a
[ 88%] Built target arch__arm__core__cortex_m__mpu
Scanning dependencies of target boards__arm__mimxrt1050_evk
[ 89%] Building C object zephyr/boards/boards/arm/mimxrt1050_evk/CMakeFiles/boards__arm__mimxrt1050_evk.dir/pinmux.c.obj
[ 90%] Linking C static library libboards__arm__mimxrt1050_evk.a
[ 90%] Built target boards__arm__mimxrt1050_evk
Scanning dependencies of target drivers__gpio
[ 91%] Building C object zephyr/drivers/gpio/CMakeFiles/drivers__gpio.dir/gpio_mcux_igpio.c.obj
[ 92%] Linking C static library libdrivers__gpio.a
[ 92%] Built target drivers__gpio
Scanning dependencies of target zephyr_prebuilt
[ 93%] Building C object zephyr/CMakeFiles/zephyr_prebuilt.dir/misc/empty_file.c.obj
[ 94%] Linking C executable zephyr_prebuilt.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:        8976 B       128 KB      6.85%
            SRAM:        3844 B       128 KB      2.93%
        IDT_LIST:          84 B         2 KB      4.10%
[ 94%] Built target zephyr_prebuilt
Scanning dependencies of target linker_pass_final_script
[ 95%] Generating linker_pass_final.cmd
[ 95%] Built target linker_pass_final_script
[ 96%] Generating isr_tables.c
Scanning dependencies of target kernel_elf
[ 97%] Building C object zephyr/CMakeFiles/kernel_elf.dir/misc/empty_file.c.obj
[ 98%] Building C object zephyr/CMakeFiles/kernel_elf.dir/isr_tables.c.obj
[100%] Linking C executable zephyr.elf
Generating files from zephyr.elf for board: mimxrt1050_evk

marco@L-xx:~/projects/misc/zephyr/samples/basic/blinky/build$ make debug
[  1%] Built target kobj_types_h_target
[  2%] Built target syscall_macros_h_target
[  3%] Generating always_rebuild
Building for board mimxrt1050_evk
[  4%] Generating misc/generated/syscalls.json
[  5%] Built target syscall_list_h_target
[  6%] Built target driver_validation_h_target
[  8%] Built target offsets
[  9%] Built target offsets_h
[ 33%] Built target kernel
[ 45%] Built target app
[ 46%] Built target linker_script
[ 62%] Built target zephyr
[ 76%] Built target arch__arm__core
[ 84%] Built target arch__arm__core__cortex_m
[ 87%] Built target arch__arm__core__cortex_m__mpu
[ 89%] Built target boards__arm__mimxrt1050_evk
[ 91%] Built target drivers__gpio
[ 93%] Built target zephyr_prebuilt
[ 94%] Built target linker_pass_final_script
[ 98%] Built target kernel_elf
[100%] Debugging mimxrt1050_evk
Using runner: jlink
J-Link GDB server running on port 2331
SEGGER J-Link GDB Server V6.32b Command Line Version

JLinkARM.dll V6.32b (DLL compiled May  8 2018 18:28:22)

-----GDB Server start settings-----
GDBInit file:                  none
GDB Server Listening port:     2331
SWO raw output listening port: 2332
Terminal I/O port:             2333
Accept remote connection:      yes
Generate logfile:              off
Verify download:               off
Init regs on start:            off
Silent mode:                   on
Single run mode:               on
Target connection timeout:     0 ms
------J-Link related settings------
J-Link Host interface:         USB
J-Link script:                 none
J-Link settings file:          none
------Target related settings------
Target device:                 Cortex-M7
Target interface:              SWD
Target interface speed:        auto
Target endian:                 little

GNU gdb (GDB) 7.11.0.20160511-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-pokysdk-linux --target=arm-zephyr-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/marco/projects/misc/zephyr/samples/basic/blinky/build/zephyr/zephyr.elf...done.
Remote debugging using :2331
0xa05f0000 in ?? ()
Resetting target
Loading section text, size 0x2176 lma 0x0
Loading section .ARM.exidx, size 0x8 lma 0x2178
Loading section devconfig, size 0x54 lma 0x2180
Loading section rodata, size 0xc0 lma 0x21d4
Loading section datas, size 0x28 lma 0x2294
Loading section initlevel, size 0x54 lma 0x22bc
Start address 0x14e4, load size 8974
Transfer rate: 83 KB/sec, 1121 bytes/write.
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0xa05f0000 in ?? ()
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0xa05f0000 in ?? ()
(gdb)

(gdb) mon reset 0
Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
(gdb) load ~/projects/misc/zephyr/samples/basic/blinky/build/zephyr/zephyr.elf
Loading section text, size 0x2176 lma 0x0
Loading section .ARM.exidx, size 0x8 lma 0x2178
Loading section devconfig, size 0x54 lma 0x2180
Loading section rodata, size 0xc0 lma 0x21d4
Loading section datas, size 0x28 lma 0x2294
Loading section initlevel, size 0x54 lma 0x22bc
Start address 0x14e4, load size 8974
Transfer rate: 85 KB/sec, 1121 bytes/write.
(gdb) break main.c:37
Note: breakpoint 4 also set at pc 0xbbc.
Breakpoint 5 at 0xbbc: file /home/marco/projects/misc/zephyr/samples/basic/blinky/src/main.c, line 37.
(gdb) c
Continuing.

Breakpoint 3, main () at /home/marco/projects/misc/zephyr/samples/basic/blinky/src/main.c:26
26    {
(gdb) c
Continuing.

Breakpoint 4, main () at /home/marco/projects/misc/zephyr/samples/basic/blinky/src/main.c:37
37            cnt++;
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0xa05f0000 in ?? ()

Marco


Re: Using shell with RTT console on nRF52840 DK

Rodrigo Peixoto
 

Mike,
I have created the issue (#8394). I will try to start that.


Thank you,
Rodrigo Peixoto
Co-founder and Technical advisor

+55 (82) 98144-8585
http://ayna.tech | Skype: rodrigopex




Re: Using shell with RTT console on nRF52840 DK

Michael Rosen
 

Rodrigo,

 

Unfortunately, as RTT is just buffers in memory, there is no good way I can think of except to have a low priority background thread which polls the input channel using GetKey() and yields if negative (basically what WaitKey() does but with a yield). It might be a good idea to create an issue on github to track this request if you haven’t already.

 

Mike

 

From: Cufi, Carles [mailto:Carles.Cufi@...]
Sent: Thursday, June 14, 2018 7:02 AM
To: Rodrigo Peixoto <rodrigopex@...>; Rosen, Michael R <michael.r.rosen@...>; Chruściński, Krzysztof <Krzysztof.Chruscinski@...>
Cc: users@...
Subject: RE: [Zephyr-users] Using shell with RTT console on nRF52840 DK

 

Hi Rodrgo,

 

Krzysztof (on copy) is working on RTT and logging as well.

 

There’s this PR from him under review at the moment: https://github.com/zephyrproject-rtos/zephyr/pull/8110

 

Regards,

 

Carles

 

From: users@... <users@...> On Behalf Of Rodrigo Peixoto
Sent: 14 June 2018 15:58
To: Rosen, Michael R <michael.r.rosen@...>
Cc: users@...
Subject: Re: [Zephyr-users] Using shell with RTT console on nRF52840 DK

 

Mike,

 

I was taking a look at the uart_console and I couldn't any straight solution for RTT.

Uart has a device driver that enables us to use an ISR approach which is cool. There is no device driver for the SEGGER (at least, I could not find it), so the only thing I have in mind right now is to make a polling on the SEGGER_RTT_HasData function to see if there is data to be read from the host, if so write it to the input hook. For me, it seems to be a not so good solution. What do you think? Any other idea?

 

 

Best regards,

Rodrigo Peixoto

Co-founder and Technical advisor

 

+55 (82) 98144-8585

http://ayna.tech | Skype: rodrigopex

 

Image removed by sender.

 

1781 - 1800 of 2707