Date   

Re: Connecting to a private resolvable address found using bt_le_scan_start

Chettimada, Vinayak Kariappa
 

Hi Jason,

 

Without bonding (connect, pair, encrypt and distribute keys) with the device, IRK cannot be obtained from the remove device.

 

Regards,

Vinayak

 

From: users@... <users@...> On Behalf Of Jason Bens via lists.zephyrproject.org
Sent: 02 May 2022 12:03
To: users@...
Subject: [Zephyr-users] Connecting to a private resolvable address found using bt_le_scan_start

 

Hi,

 

I’m writing some firmware for both sides of a BLE link.  I would like to scan for advertisers, filter the results to find my device, then store the address to be connected later, without necessarily connecting at the moment.  I think this is possible if I use static addresses, but I would prefer to use a private resolvable address.  What is the process to use the bt_le_address_t returned in the info struct of the .recv callback to get the IRK so I can connect to the remote device at a later time?

 

Thanks,

 

  • Jason


Connecting to a private resolvable address found using bt_le_scan_start

Jason Bens <jason.bens@...>
 

Hi,

 

I’m writing some firmware for both sides of a BLE link.  I would like to scan for advertisers, filter the results to find my device, then store the address to be connected later, without necessarily connecting at the moment.  I think this is possible if I use static addresses, but I would prefer to use a private resolvable address.  What is the process to use the bt_le_address_t returned in the info struct of the .recv callback to get the IRK so I can connect to the remote device at a later time?

 

Thanks,

 

  • Jason


STM32 VS Code

mshary@...
 

Hello, can someone describe how to create a project for stm32f407 and Zephyr os with opportunity to flash and debug in VS code


Re: west flash issue

Anis
 

you need to have JLINK folder in your PATH.

see this link for how to add something to the path https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/

Anis

On 4/28/22 14:26, Yojanse Duarte wrote:

Hi,

Im trying to use zephyr os but I cant flash because im having problems with jlink, how can I solve It?

 

 

Yojanse Duarte
Ingeniero de Hardware
TripleCyber S.R.L.

RNC: 1-32-28980-3
Telefono: (829) 823-3481
yojanse.duarte@... | www.triplecyber.com

 

Visita a TripleCyber en redes sociales: 

Este correo electrónico y los archivos transmitidos con él son confidenciales y están destinados únicamente al uso de la persona o entidad a la que se dirigen. Si usted no es el destinatario previsto o la persona responsable de entregar el correo electrónico al destinatario previsto, tenga en cuenta que ha recibido este correo electrónico y cualquier archivo transmitido por error y que cualquier uso, difusión, reenvío, impresión o copia de este correo electrónico y / o dichos archivos está estrictamente prohibido. Si ha recibido este correo electrónico por error, notifique inmediatamente al remitente y destruya el mensaje original y todos los archivos adjuntos.

 


west flash issue

Yojanse Duarte <Yojanse.Duarte@...>
 

Hi,

Im trying to use zephyr os but I cant flash because im having problems with jlink, how can I solve It?

 

 

Yojanse Duarte
Ingeniero de Hardware
TripleCyber S.R.L.

RNC: 1-32-28980-3
Telefono: (829) 823-3481
yojanse.duarte@... | www.triplecyber.com

 

Visita a TripleCyber en redes sociales: 

Este correo electrónico y los archivos transmitidos con él son confidenciales y están destinados únicamente al uso de la persona o entidad a la que se dirigen. Si usted no es el destinatario previsto o la persona responsable de entregar el correo electrónico al destinatario previsto, tenga en cuenta que ha recibido este correo electrónico y cualquier archivo transmitido por error y que cualquier uso, difusión, reenvío, impresión o copia de este correo electrónico y / o dichos archivos está estrictamente prohibido. Si ha recibido este correo electrónico por error, notifique inmediatamente al remitente y destruya el mensaje original y todos los archivos adjuntos.

 


Re: Executing a Post Build Batch File using CMake

Bolivar, Marti
 

Hi Casey,

Did you have a look at the global 'extra_post_build_commands' and
'extra_post_build_byproducts' properties mentioned in
zephyr/CMakeLists.txt?

Try searching around the source tree to see how it is used and if you
can adapt it to your needs.

HTH,
Martí

On Wed, Apr 13 2022, Casey Shea via lists.zephyrproject.org wrote:
*Build Environment Details*

* Building Zephyr with CMake
* ARM Platform (Nordic nrf5340)
* Source and Build directories are out of tree.

* My build directory is ${ CMAKE_CURRENT_SOURCE_DIR }../../Executables
* My source directories are in several places, but all are in a sub-directory of ${ CMAKE_CURRENT_SOURCE_DIR }/../../../../

* CLion is my IDE of choice but I don't believe that matters for this discusson.

*What I am Trying to Achieve*
At the end of my build process, I would like to execute a batch file on the zephyr_final target that signs the final image.  This is different than the MCU Boot signature and is a custom proprietary signature.  I am unable to change the way in which this image is signed as it must be compatible with existing tools used with my product.

*Method in Which I am trying to Achieve*
Normally, I would do this using add_custom_command(TARGET target_name POST_BUILD
COMMAND "batchfile.bat" batchfile_arguments)

However, I don't believe that the final zephyr target is within the scope of the top-level CMakeLists.txt file.  That said, I do not have a lot of experience with CMake as most of my past development was within the IAR toolchain.  It's very possible that I am misinterpreting this.

Questions
1.  Will I be able to use the add_custom_command() CMake function to execute the batch file?  If so, can someone provide an example as to how I would do this and what Target I should be using.

2.  Is there a better, more appropriate method for doing this within the Zephyr environment.

Any help or guidance is much appreciated!



Re: Executing a Post Build Batch File using CMake

mlsvrts
 

Hi Casey,

I have been using `add_custom_command` to sign my generated images like this:

set(ZEPHYR_SIGNED_BIN ${ZEPHYR_BINARY_DIR}/zephyr.signed.bin)
set(MCUBOOT_SIGNING_KEY ${ZEPHYR_BASE}/../bootloader/mcuboot/root-rsa-2048.pem)
set(APP_VERSION 1.0.5+2)

add_custom_command(
    COMMAND west sign -t imgtool --
        --key ${MCUBOOT_SIGNING_KEY}
        --version ${APP_VERSION}
    OUTPUT ${ZEPHYR_SIGNED_BIN}
    DEPENDS zephyr_final
    COMMENT "Running post-build signing step..."
)

add_custom_target(
    post_bin ALL
    DEPENDS
    ${ZEPHYR_SIGNED_BIN}
)


Note that the command won't trigger without the additional `custom_target`. Also, my source directory is child of `zephyrproject/zephyr`, so I can't say for certain that this will work in your case.

- mlsvrts


Executing a Post Build Batch File using CMake

Casey Shea
 

Build Environment Details
  • Building Zephyr with CMake
  • ARM Platform (Nordic nrf5340)
  • Source and Build directories are out of tree.
    • My build directory is ${CMAKE_CURRENT_SOURCE_DIR}../../Executables
    • My source directories are in several places, but all are in a sub-directory of ${CMAKE_CURRENT_SOURCE_DIR}/../../../../
  • CLion is my IDE of choice but I don't believe that matters for this discusson.

What I am Trying to Achieve
At the end of my build process, I would like to execute a batch file on the zephyr_final target that signs the final image.  This is different than the MCU Boot signature and is a custom proprietary signature.  I am unable to change the way in which this image is signed as it must be compatible with existing tools used with my product.

Method in Which I am trying to Achieve
Normally, I would do this using add_custom_command(TARGET target_name POST_BUILD 
                                                                           COMMAND "batchfile.bat" batchfile_arguments)

However, I don't believe that the final zephyr target is within the scope of the top-level CMakeLists.txt file.  That said, I do not have a lot of experience with CMake as most of my past development was within the IAR toolchain.  It's very possible that I am misinterpreting this.  

Questions
1.  Will I be able to use the add_custom_command() CMake function to execute the batch file?  If so, can someone provide an example as to how I would do this and what Target I should be using.

2.  Is there a better, more appropriate method for doing this within the Zephyr environment.


Any help or guidance is much appreciated!  




Re: Zephyr wi-fi shell on Windows 10: sending commands?

gianluca torta
 

just in case someone will hit this issue

I solved it installing Putty terminal emulator on Windows 10

Gianluca


Zephyr wi-fi shell on Windows 10: sending commands?

gianluca torta
 

hi all,

I have added the wi-fi shell support to my Zephyr project, by adding the following options:
CONFIG_NET_L2_WIFI_SHELL=y
CONFIG_NET_SHELL=y
CONFIG_SHELL=y

I am on Windows 10 and use Tera Term as a terminal

the shell starts and prints a few lines followed by the prompt, where I can write commands such as:
wifi connect [...]
so everything looks good

unfortunately, when I hit the enter key, the command is not sent to the board

I have tried to tweak the config of Tera Term as much as I could (e.g. CR/CR-LF/LF end of lines ecc.) to no avail

does anyone have succeded sending commands through the Zephyr shell with Tera Term (or any other terminal emulator available on Windows 10)?

thanks in advance,
Gianluca



West v0.13.0

Bolivar, Marti
 

Hello,

I'm announcing west v0.13.0.

This release allows you to associate arbitrary user data with the
manifest repository, and contains some fixes for errors related to path
handling.

There were several API changes. Please see the release notes for
details.

Release links:

- PyPI: https://pypi.org/project/west/0.13.0/
- GitHub: https://github.com/zephyrproject-rtos/west/releases/tag/v0.13.0
- Release notes: https://docs.zephyrproject.org/latest/guides/west/release-notes.html#v0-13-0

To upgrade:

- Ubuntu: pip3 install --user west==0.13.0
- Windows/macOS: pip3 install west==0.13.0

Thanks to everyone who contributed to this release's development,
testing, documentation, and review!

Martí

---

Jeff Rizzo (1):
Support the MSYS2 platform

John L. Villalovos (1):
Raise RuntimeError() if can't find rev for HEAD

Marc Herbert (1):
update: fix --tags explanation in --narrow help string

Martí Bolívar (35):
MAINTAINERS.rst: update 'cutting a release branch'
tests: adjust create_repo() to keep working on OLDER git
manifest: add project 'userdata' key
manifest: fix some Project.userdata issues
main: handle WestNotFound
util: tweak WestNotFound text
Revert "project: make a list from filtered project iterator"
Revert "project: print logs from the correct job"
Revert "add config `update.unbuffered`"
Revert "tests: add `test_update_projects_threaded*`"
Revert "add support for multi-threaded `west update`"
.github: remove py 3.6 from ci matrix
west list: fix "{sha}" for manifest project
manifest: bump schema version
tests: update tests for schema version
tests: test_help: python implementation detail tweak
tests: test_manifest: minor tweaks
manifest: clarify Manifest.from_data docstring
configuration: tweak an internal helper
configuration: add Configuration class
app: main: make a west.configuration.Configuration
WestCommand: remove deprecated kwarg
WestCommand: use Configuration objects
builtins: use WestCommand.config
configuration: deprecate old style global state interface
manifest: fix ManifestProject __repr__
manifest: validate: return validated dict
manifest: ManifestImportFailed: relax argument specification
manifest: cosmetic changes
test_manifest: create git repo in fixtures
tests: fix invalid_duplicate_name.yaml
treewide: overhaul manifest path handling
manifest.py: fix docstring
version: 0.13.0a1
version: 0.13.0

Michael Zimmermann (2):
project: print logs from the correct job
project: make a list from filtered project iterator

Ryan Lindeman (3):
Allow userdata to be defined under self in manifest repository
Bump manifest schema version due to non-backward compatible change in adding userdata under self
Allow manifest object to also provide userdata in preparation for removing ManifestProject class eventually and strengthen related tests


Re: Compiling sample program on MAC 10.14 gets a compilation error

Bolivar, Marti
 

Hi,

Looks like my previous mail got mangled. Let me retry.

Since you are using a toolchain from homebrew following unofficial instructions from Adafruit, and you are getting an internal error message from the toolchain itself, I would encourage you to try again using the official getting started guide:


From: users@... <users@...> on behalf of Sowmya Krishnaswamy via lists.zephyrproject.org <sokrishn=yahoo.com@...>
Sent: Monday, April 4, 2022 11:19 PM
To: users@... <users@...>
Cc: Sowmya Krishnaswamy <krishnaswamy.sowmya@...>
Subject: [Zephyr-users] Compiling sample program on MAC 10.14 gets a compilation error
 
Hi,

I am following the steps outlined in 


On MAC-OS (10.14).

brew install gcc-arm-embedded --cask 
which arm-none-eabi-gdb
export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
export GNUARMEMB_TOOLCHAIN_PATH=/usr/local/

echo $ZEPHYR_TOOLCHAIN_VARIANT 

west build -p auto -b nucleo_wb55rg samples/basic/blinky 
-- west build: making build dir /Users/user/zephyrproject/zephyr/build pristine
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /Users/user/zephyrproject/zephyr/samples/basic/blinky
-- Found Python3: /usr/local/opt/python@3.9/bin/python3.9 (found suitable exact version "3.9.12") found components: Interpreter 
-- Cache files will be written to: /Users/user/Library/Caches/zephyr
-- Zephyr version: 3.0.99 (/Users/user/zephyrproject/zephyr)
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: nucleo_wb55rg
-- Found dtc: /usr/local/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/usr/local)
-- Found BOARD.dts: /Users/user/zephyrproject/zephyr/boards/arm/nucleo_wb55rg/nucleo_wb55rg.dts
-- Generated zephyr.dts: /Users/user/zephyrproject/zephyr/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /Users/user/zephyrproject/zephyr/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /Users/user/zephyrproject/zephyr/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /Users/user/zephyrproject/zephyr/build/zephyr/dts.cmake
/Users/user/zephyrproject/zephyr/build/zephyr/zephyr.dts:98.39-103.5: Warning (interrupt_provider): /soc/interrupt-controller@58000800: Missing #address-cells in interrupt provider
Parsing /Users/user/zephyrproject/zephyr/Kconfig
Loaded configuration '/Users/user/zephyrproject/zephyr/boards/arm/nucleo_wb55rg/nucleo_wb55rg_defconfig'
Merged configuration '/Users/user/zephyrproject/zephyr/samples/basic/blinky/prj.conf'
Configuration saved to '/Users/user/zephyrproject/zephyr/build/zephyr/.config'
Kconfig header saved to '/Users/user/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 11.2.1
-- The CXX compiler identification is GNU 11.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/local/bin/arm-none-eabi-gcc
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/user/zephyrproject/zephyr/build
-- west build: building application
[1/156] Preparing syscall dependency handling

[2/156] Generating include/generated/version.h
-- Zephyr version: 3.0.99 (/Users/user/zephyrproject/zephyr), build: zephyr-v3.0.0-2262-ge8a369e7da50
[19/156] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj
FAILED: zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj 
ccache /usr/local/bin/arm-none-eabi-gcc -DCORE_CM4 -DHSE_VALUE=32000000 -DKERNEL -DSTM32WB55xx -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/Users/user/zephyrproject/zephyr/kernel/include -I/Users/user/zephyrproject/zephyr/arch/arm/include -I/Users/user/zephyrproject/zephyr/include -I/Users/user/zephyrproject/zephyr/build/zephyr/include/generated -I/Users/user/zephyrproject/zephyr/soc/arm/st_stm32/stm32wb -I/Users/user/zephyrproject/zephyr/drivers -I/Users/user/zephyrproject/zephyr/soc/arm/st_stm32/common -I/Users/user/zephyrproject/modules/hal/cmsis/CMSIS/Core/Include -I/Users/user/zephyrproject/modules/hal/atmel/include -I/Users/user/zephyrproject/modules/hal/stm32/stm32cube/stm32wbxx/soc -I/Users/user/zephyrproject/modules/hal/stm32/stm32cube/stm32wbxx/drivers/include -I/Users/user/zephyrproject/modules/hal/stm32/stm32cube/stm32wbxx/drivers/include/Legacy -I/Users/user/zephyrproject/modules/hal/stm32/stm32cube/common_ll/include -isystem /Users/user/zephyrproject/zephyr/lib/libc/minimal/include -isystem /Applications/ARM/bin/../lib/gcc/arm-none-eabi/11.2.1/include -isystem /Applications/ARM/bin/../lib/gcc/arm-none-eabi/11.2.1/include-fixed -Os -imacros /Users/user/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -imacros /Users/user/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/Users/user/zephyrproject/zephyr/samples/basic/blinky=CMAKE_SOURCE_DIR -fmacro-prefix-map=/Users/user/zephyrproject/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/Users/user/zephyrproject=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj -MF zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj.d -o zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj -c /Users/user/zephyrproject/zephyr/lib/os/timeutil.c
/Users/user/zephyrproject/zephyr/lib/os/timeutil.c: In function 'timeutil_sync_skew_to_ppb':
/Users/user/zephyrproject/zephyr/lib/os/timeutil.c:185:9: internal compiler error: Illegal instruction: 4
  185 |         int64_t ppb64 = (int64_t)((1.0 - (double)skew) * 1E9);
      |         ^~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.linaro.org/> for instructions.
[28/156] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/thread_entry.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /Users/user/zephyrproject/zephyr/build
users-MacBook-Pro:zephyr user$ 

Would anyone know what might be the issue and how to resolve this?

Best Regards
Sowmya


Re: Compiling sample program on MAC 10.14 gets a compilation error

Bolivar, Marti
 

On April 4, 2022 11:19 pm, Sowmya Krishnaswamy via lists.zephyrproject.org wrote:
Hi,

I am following the steps outlined in

1. https://learn.adafruit.com/blinking-led-with-zephyr-rtos/installing-zephyr-osx <https://learn.adafruit.com/blinking-led-with-zephyr-rtos/installing-zephyr-osx>
2. https://learn.adafruit.com/blinking-led-with-zephyr-rtos/building-a-sample-program <https://learn.adafruit.com/blinking-led-with-zephyr-rtos/building-a-sample-program>

On MAC-OS (10.14).

brew install gcc-arm-embedded --cask
which arm-none-eabi-gdb
export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
export GNUARMEMB_TOOLCHAIN_PATH=/usr/local/
echo $ZEPHYR_TOOLCHAIN_VARIANT

west build -p auto -b nucleo_wb55rg samples/basic/blinky
-- west build: making build dir /Users/user/zephyrproject/zephyr/build pristine
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /Users/user/zephyrproject/zephyr/samples/basic/blinky
-- Found Python3: /usr/local/opt/python@3.9/bin/python3.9 (found suitable exact version "3.9.12") found components: Interpreter
-- Cache files will be written to: /Users/user/Library/Caches/zephyr
-- Zephyr version: 3.0.99 (/Users/user/zephyrproject/zephyr)
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: nucleo_wb55rg
-- Found dtc: /usr/local/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/usr/local)
-- Found BOARD.dts: /Users/user/zephyrproject/zephyr/boards/arm/nucleo_wb55rg/nucleo_wb55rg.dts
-- Generated zephyr.dts: /Users/user/zephyrproject/zephyr/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /Users/user/zephyrproject/zephyr/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /Users/user/zephyrproject/zephyr/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /Users/user/zephyrproject/zephyr/build/zephyr/dts.cmake
/Users/user/zephyrproject/zephyr/build/zephyr/zephyr.dts:98.39-103.5: Warning (interrupt_provider): /soc/interrupt-controller@58000800: Missing #address-cells in interrupt provider
Parsing /Users/user/zephyrproject/zephyr/Kconfig
Loaded configuration '/Users/user/zephyrproject/zephyr/boards/arm/nucleo_wb55rg/nucleo_wb55rg_defconfig'
Merged configuration '/Users/user/zephyrproject/zephyr/samples/basic/blinky/prj.conf'
Configuration saved to '/Users/user/zephyrproject/zephyr/build/zephyr/.config'
Kconfig header saved to '/Users/user/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 11.2.1
-- The CXX compiler identification is GNU 11.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/local/bin/arm-none-eabi-gcc
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/user/zephyrproject/zephyr/build
-- west build: building application
[1/156] Preparing syscall dependency handling

[2/156] Generating include/generated/version.h
-- Zephyr version: 3.0.99 (/Users/user/zephyrproject/zephyr), build: zephyr-v3.0.0-2262-ge8a369e7da50
[19/156] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj
FAILED: zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj
ccache /usr/local/bin/arm-none-eabi-gcc -DCORE_CM4 -DHSE_VALUE=32000000 -DKERNEL -DSTM32WB55xx -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/Users/user/zephyrproject/zephyr/kernel/include -I/Users/user/zephyrproject/zephyr/arch/arm/include -I/Users/user/zephyrproject/zephyr/include -I/Users/user/zephyrproject/zephyr/build/zephyr/include/generated -I/Users/user/zephyrproject/zephyr/soc/arm/st_stm32/stm32wb -I/Users/user/zephyrproject/zephyr/drivers -I/Users/user/zephyrproject/zephyr/soc/arm/st_stm32/common -I/Users/user/zephyrproject/modules/hal/cmsis/CMSIS/Core/Include -I/Users/user/zephyrproject/modules/hal/atmel/include -I/Users/user/zephyrproject/modules/hal/stm32/stm32cube/stm32wbxx/soc -I/Users/user/zephyrproject/modules/hal/stm32/stm32cube/stm32wbxx/drivers/include -I/Users/user/zephyrproject/modules/hal/stm32/stm32cube/stm32wbxx/drivers/include/Legacy -I/Users/user/zephyrproject/modules/hal/stm32/stm32cube/common_ll/include -isystem /Users/user/zephyrproject/zephyr/lib/libc/minimal/include -isystem /Applications/ARM/bin/../lib/gcc/arm-none-eabi/11.2.1/include -isystem /Applications/ARM/bin/../lib/gcc/arm-none-eabi/11.2.1/include-fixed -Os -imacros /Users/user/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -imacros /Users/user/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/Users/user/zephyrproject/zephyr/samples/basic/blinky=CMAKE_SOURCE_DIR -fmacro-prefix-map=/Users/user/zephyrproject/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/Users/user/zephyrproject=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj -MF zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj.d -o zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj -c /Users/user/zephyrproject/zephyr/lib/os/timeutil.c
/Users/user/zephyrproject/zephyr/lib/os/timeutil.c: In function 'timeutil_sync_skew_to_ppb':
/Users/user/zephyrproject/zephyr/lib/os/timeutil.c:185:9: internal compiler error: Illegal instruction: 4
185 | int64_t ppb64 = (int64_t)((1.0 - (double)skew) * 1E9);
| ^~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.linaro.org/ <https://bugs.linaro.org/>> for instructions.
[28/156] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/thread_entry.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /Users/user/zephyrproject/zephyr/build
users-MacBook-Pro:zephyr user$

Would anyone know what might be the issue and how to resolve this?

Best Regards
Sowmya





Re: Enabling i2c on nucleo_f429zi

Jason Bens <jason.bens@...>
 

Hi David. I'm also not an expert, but I'll try to help you if I can. More experienced users can feel free to correct me on this.

First off, regarding "And accordingly its the devicetree contains an i2c1 node but not in the root node and I'm still figuring out what does that mean". Surprisingly, the i2c1 node actually is in the root node. It's a long and convoluted path, but at the top of the nucleo_f429zi.dts file, another soc-specific dts fragment is included, <st/f4/stm32f429Xi.dtsi>. This is relative to zephyr/dts/arm/. This device tree fragment includes another device tree fragment, which includes another ... and another ... and another.. and so on, until you finally get to stm32f4.dtsi, which is basically the starting point of the stm32f4 soc family. It's here that you'll find the root node, inside of which is the soc node, which contains your i2c1 node, as well as the rest of your peripherals. DTS files are c-like. So, the ampersand in front of i2c1 in the nucleo dts file means you're working on a reference to the node, and not the node itself, which is defined elsewhere.

Next, you're probably hitting the #error "Please set the correct I2C device" line because the precompile conditionals are using the DT_ALIAS macro. Per https://docs.zephyrproject.org/latest/reference/devicetree/api.html?highlight=dt_alias#c.DT_ALIAS, DT_ALIAS looks for a node identifier in the /aliases node. Unfortunately, the nucleof429 dts file doesn't have an alias called i2c_0 or i2c_1. You'll have to add it yourself. My untested attempt:
aliases {
led0 = &green_led_1;
led1 = &blue_led_1;
led2 = &red_led_1;
sw0 = &user_button;
i2c_1 = &i2c1;
};

It would also be possible to use DT_NODELABEL(i2c1) to get the node identifier using the node label, rather than the alias. Note the difference here between the node i2c1 and the alias i2c_1.

Hopefully that can help get you started.

- Jason

-----Original Message-----
From: users@... <users@...> On Behalf Of David Demelier
Sent: April 6, 2022 9:17 AM
To: users@...
Subject: [Zephyr-users] Enabling i2c on nucleo_f429zi

External Email:

Hi there,

Quite new to zephyr and still reading its documentation actively. I've been able to successfully generate, debug and use GPIO based applications (following the very well documented blinky and other examples).

Now I'd like to use an i2c device (temperature sensors) that I was able to successfully use under a standard Linux distribution for testing.
I'm still having lots of confusion regarding the devicetree APIs and general use of it.

First of all, I've enabled i2c by adding this to my prj.conf:

CONFIG_I2C=y
CONFIG_I2C_STM32=y

Then I've followed an example in the tree
(tests/drivers/i2c/i2c_api/src/test_i2c.c)

#if DT_NODE_HAS_STATUS(DT_ALIAS(i2c_0), okay)
#define I2C_DEV_NAME DT_LABEL(DT_ALIAS(i2c_0))
#elif DT_NODE_HAS_STATUS(DT_ALIAS(i2c_1), okay)
#define I2C_DEV_NAME DT_LABEL(DT_ALIAS(i2c_1))
#elif DT_NODE_HAS_STATUS(DT_ALIAS(i2c_2), okay)
#define I2C_DEV_NAME DT_LABEL(DT_ALIAS(i2c_2))
#else
#error "Please set the correct I2C device"
#endif

But to my understanding, to work you need to have i2c_0 in the devicetree for my board because I reach the `#error` line at compile time. And accordingly its the devicetree contains an i2c1 node but not in the root node and I'm still figuring out what does that mean.

nucleo_f429zi.dts:

&i2c1 {
pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>;
pinctrl-names = "default";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>; };

Any help and additional documentation I should read are welcome.

Regards,

--
David


Enabling i2c on nucleo_f429zi

David Demelier <markand@...>
 

Hi there,

Quite new to zephyr and still reading its documentation actively. I've
been able to successfully generate, debug and use GPIO based
applications (following the very well documented blinky and other
examples).

Now I'd like to use an i2c device (temperature sensors) that I was able
to successfully use under a standard Linux distribution for testing.
I'm still having lots of confusion regarding the devicetree APIs and
general use of it.

First of all, I've enabled i2c by adding this to my prj.conf:

CONFIG_I2C=y
CONFIG_I2C_STM32=y

Then I've followed an example in the tree
(tests/drivers/i2c/i2c_api/src/test_i2c.c)

#if DT_NODE_HAS_STATUS(DT_ALIAS(i2c_0), okay)
#define I2C_DEV_NAME DT_LABEL(DT_ALIAS(i2c_0))
#elif DT_NODE_HAS_STATUS(DT_ALIAS(i2c_1), okay)
#define I2C_DEV_NAME DT_LABEL(DT_ALIAS(i2c_1))
#elif DT_NODE_HAS_STATUS(DT_ALIAS(i2c_2), okay)
#define I2C_DEV_NAME DT_LABEL(DT_ALIAS(i2c_2))
#else
#error "Please set the correct I2C device"
#endif

But to my understanding, to work you need to have i2c_0 in the
devicetree for my board because I reach the `#error` line at compile
time. And accordingly its the devicetree contains an i2c1 node but not
in the root node and I'm still figuring out what does that mean.

nucleo_f429zi.dts:

&i2c1 {
pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>;
pinctrl-names = "default";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
};

Any help and additional documentation I should read are welcome.

Regards,

--
David


CC1310

Akshay Mishra
 

Hello All, i can see cc1352R has a support for sub-GHz 

Wanted to ask if cc1310 is supported to take 6LoWPAN and Zephyr?

Thanks,
Akshay 


Compiling sample program on MAC 10.14 gets a compilation error

Sowmya Krishnaswamy <sokrishn@...>
 

Hi,

I am following the steps outlined in 


On MAC-OS (10.14).

brew install gcc-arm-embedded --cask 
which arm-none-eabi-gdb
export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
export GNUARMEMB_TOOLCHAIN_PATH=/usr/local/

echo $ZEPHYR_TOOLCHAIN_VARIANT 

west build -p auto -b nucleo_wb55rg samples/basic/blinky 
-- west build: making build dir /Users/user/zephyrproject/zephyr/build pristine
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /Users/user/zephyrproject/zephyr/samples/basic/blinky
-- Found Python3: /usr/local/opt/python@3.9/bin/python3.9 (found suitable exact version "3.9.12") found components: Interpreter 
-- Cache files will be written to: /Users/user/Library/Caches/zephyr
-- Zephyr version: 3.0.99 (/Users/user/zephyrproject/zephyr)
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: nucleo_wb55rg
-- Found dtc: /usr/local/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/usr/local)
-- Found BOARD.dts: /Users/user/zephyrproject/zephyr/boards/arm/nucleo_wb55rg/nucleo_wb55rg.dts
-- Generated zephyr.dts: /Users/user/zephyrproject/zephyr/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /Users/user/zephyrproject/zephyr/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /Users/user/zephyrproject/zephyr/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /Users/user/zephyrproject/zephyr/build/zephyr/dts.cmake
/Users/user/zephyrproject/zephyr/build/zephyr/zephyr.dts:98.39-103.5: Warning (interrupt_provider): /soc/interrupt-controller@58000800: Missing #address-cells in interrupt provider
Parsing /Users/user/zephyrproject/zephyr/Kconfig
Loaded configuration '/Users/user/zephyrproject/zephyr/boards/arm/nucleo_wb55rg/nucleo_wb55rg_defconfig'
Merged configuration '/Users/user/zephyrproject/zephyr/samples/basic/blinky/prj.conf'
Configuration saved to '/Users/user/zephyrproject/zephyr/build/zephyr/.config'
Kconfig header saved to '/Users/user/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 11.2.1
-- The CXX compiler identification is GNU 11.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/local/bin/arm-none-eabi-gcc
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/user/zephyrproject/zephyr/build
-- west build: building application
[1/156] Preparing syscall dependency handling

[2/156] Generating include/generated/version.h
-- Zephyr version: 3.0.99 (/Users/user/zephyrproject/zephyr), build: zephyr-v3.0.0-2262-ge8a369e7da50
[19/156] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj
FAILED: zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj 
ccache /usr/local/bin/arm-none-eabi-gcc -DCORE_CM4 -DHSE_VALUE=32000000 -DKERNEL -DSTM32WB55xx -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I/Users/user/zephyrproject/zephyr/kernel/include -I/Users/user/zephyrproject/zephyr/arch/arm/include -I/Users/user/zephyrproject/zephyr/include -I/Users/user/zephyrproject/zephyr/build/zephyr/include/generated -I/Users/user/zephyrproject/zephyr/soc/arm/st_stm32/stm32wb -I/Users/user/zephyrproject/zephyr/drivers -I/Users/user/zephyrproject/zephyr/soc/arm/st_stm32/common -I/Users/user/zephyrproject/modules/hal/cmsis/CMSIS/Core/Include -I/Users/user/zephyrproject/modules/hal/atmel/include -I/Users/user/zephyrproject/modules/hal/stm32/stm32cube/stm32wbxx/soc -I/Users/user/zephyrproject/modules/hal/stm32/stm32cube/stm32wbxx/drivers/include -I/Users/user/zephyrproject/modules/hal/stm32/stm32cube/stm32wbxx/drivers/include/Legacy -I/Users/user/zephyrproject/modules/hal/stm32/stm32cube/common_ll/include -isystem /Users/user/zephyrproject/zephyr/lib/libc/minimal/include -isystem /Applications/ARM/bin/../lib/gcc/arm-none-eabi/11.2.1/include -isystem /Applications/ARM/bin/../lib/gcc/arm-none-eabi/11.2.1/include-fixed -Os -imacros /Users/user/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -imacros /Users/user/zephyrproject/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/Users/user/zephyrproject/zephyr/samples/basic/blinky=CMAKE_SOURCE_DIR -fmacro-prefix-map=/Users/user/zephyrproject/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/Users/user/zephyrproject=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj -MF zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj.d -o zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj -c /Users/user/zephyrproject/zephyr/lib/os/timeutil.c
/Users/user/zephyrproject/zephyr/lib/os/timeutil.c: In function 'timeutil_sync_skew_to_ppb':
/Users/user/zephyrproject/zephyr/lib/os/timeutil.c:185:9: internal compiler error: Illegal instruction: 4
  185 |         int64_t ppb64 = (int64_t)((1.0 - (double)skew) * 1E9);
      |         ^~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.linaro.org/> for instructions.
[28/156] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/thread_entry.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /Users/user/zephyrproject/zephyr/build
users-MacBook-Pro:zephyr user$ 

Would anyone know what might be the issue and how to resolve this?

Best Regards
Sowmya


Re: Suppress line breaks when using LOG_INF etc with RTT and Segger #debugging

Chruściński, Krzysztof
 

Hi Justin,

 

It is an option flag that can be used with log_output module which is a helper module for formatting log messages. Most of backends does not use it. It can be easily added to certain backend if needed as a Kconfig option. Feel free to open a Pull Request or let me know which backend you are using.

 

Regards,

Krzysztof

 

From: users@... <users@...> On Behalf Of justin.leavesley via lists.zephyrproject.org
Sent: Saturday, April 2, 2022 11:11 AM
To: users@...
Subject: [Zephyr-users] Suppress line breaks when using LOG_INF etc with RTT and Segger #debugging

 

I would have thought this was easy but I cannot seem to find a way to prevent LOG_INF etc from adding a line break to the log string. 

I have found the following log flag definition in log_output.h

#define LOG_OUTPUT_FLAG_CRLF_NONE BIT(4)

But I cannot see how to set this flag in the build and config system so that the logging picks it up.

 

Thanks,

Justin

 


Suppress line breaks when using LOG_INF etc with RTT and Segger #debugging

justin.leavesley@...
 

I would have thought this was easy but I cannot seem to find a way to prevent LOG_INF etc from adding a line break to the log string. 

I have found the following log flag definition in log_output.h

#define LOG_OUTPUT_FLAG_CRLF_NONE BIT(4)

But I cannot see how to set this flag in the build and config system so that the logging picks it up.

 

Thanks,

Justin




Re: help with BLE HCI dual chip setup

Anis
 

thank you that did the trick :)

Anis

On 3/30/22 10:08, Cufi, Carles wrote:

Hi there,

 

On the board acting as a Host (i.e. the one that is running the app, not the on running hci_uart) you need to add a chosen node for  zephyr,bt-uart, like here:

 

https://github.com/zephyrproject-rtos/zephyr/blob/main/boards/arm/hexiwear_k64/hexiwear_k64.dts#L29

 

More about zephyr chosen nodes here:

 

https://docs.zephyrproject.org/latest/reference/devicetree/api.html#id2

 

Carles

 

 

From: users@... <users@...> On Behalf Of Anis via lists.zephyrproject.org
Sent: 29 March 2022 23:04
To: users@...
Subject: [Zephyr-users] help with BLE HCI dual chip setup

 

Hello,
I am testing the dual chip configuration of the BLE.
I am using two nrf52dk boards and I would like to setup one as host and one as controller.
I am following the "96Boards Carbon nRF51" sample as a reference.
my goal is to use a uart for the connection between the two boards.
I was able to build the controller part of the code but failed on the host.
I am testing with the peripheral sample project.
in the boards folder I added a .conf and .overlay files for the nrf52dk.
my nrf52dk_nrf52832.overlay file is as follows

&uart0 {
    compatible = "nordic,nrf-uart";
    current-speed = <1000000>;
    status = "okay";
    hw-flow-control;
    tx-pin = <5>;
    rx-pin = <4>;
    rts-pin = <7>;
    cts-pin = <6>;
};

my nrf52dk_nrf52832.conf file is as follows

CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y

CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n

 

CONFIG_SERIAL=y

CONFIG_UART_CONSOLE=n

CONFIG_USE_SEGGER_RTT=y

CONFIG_RTT_CONSOLE=y

CONFIG_LOG=y

CONFIG_LOG_DEFAULT_LEVEL=4

CONFIG_SPI_LOG_LEVEL_DBG=y

CONFIG_LOG_BACKEND_RTT=y

I added the following to prj.conf

# Incresed stack due to settings API usage

CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

 

CONFIG_BT=y

CONFIG_BT_DEBUG_LOG=y

CONFIG_BT_SMP=y

CONFIG_BT_SIGNING=y

CONFIG_BT_PERIPHERAL=y

CONFIG_BT_DIS=y

CONFIG_BT_ATT_PREPARE_COUNT=5

CONFIG_BT_BAS=y

CONFIG_BT_HRS=y

CONFIG_BT_PRIVACY=y

CONFIG_BT_DEVICE_NAME="Zephyr Peripheral Sample Long Name"

CONFIG_BT_DEVICE_APPEARANCE=833

CONFIG_BT_DEVICE_NAME_DYNAMIC=y

CONFIG_BT_DEVICE_NAME_MAX=65

 

CONFIG_BT_KEYS_OVERWRITE_OLDEST=y

CONFIG_BT_SETTINGS=y

CONFIG_FLASH=y

CONFIG_FLASH_PAGE_LAYOUT=y

CONFIG_FLASH_MAP=y

CONFIG_NVS=y

CONFIG_SETTINGS=y

 

# added these to enable the BLE HCI config

CONFIG_GPIO=y

CONFIG_SERIAL=y

CONFIG_UART_INTERRUPT_DRIVEN=y

CONFIG_BT_HCI=y

CONFIG_BT_CTLR=n

the project doesn't build. it gives the following error

error: '__device_dts_ord_DT_CHOSEN_zephyr_bt_uart_ORD' undeclared (first use in this function)

 

any advice on how to fix this or how to get get a dual chip setup to work would be very appreciated.

Thanks

161 - 180 of 3086