Date   

eclipse

novello
 

Sorry But I have find the same problem  with eclipse.
If I use  the command line it work.
(STM32 microcontroller)
Best regards
Novello G


Error in NRF SoC flash memory compilation #nrf52840

giriprasad@...
 

When Iam trying to include flash.h file in my application noticed below compilation error.
Can you help me to resolve the issue
 
ZEPHYR/zephyrproject/zephyr/include/drivers/flash.h: In function 'int z_impl_flash_read(device*, off_t, void*, size_t)':
ZEPHYR/zephyrproject/zephyr/include/drivers/flash.h:104:44: error: invalid conversion from 'const void*' to 'const flash_driver_api*' [-fpermissive]
  const struct flash_driver_api *api = dev->driver_api;
                                       ~~~~~^~~~~~~~~~
ZEPHYR/zephyrproject/zephyr/include/drivers/flash.h: In function 'int z_impl_flash_write(device*, off_t, const void*, size_t)':
EPHYR/zephyrproject/zephyr/include/drivers/flash.h:128:44: error: invalid conversion from 'const void*' to 'const flash_driver_api*' [-fpermissive]
  const struct flash_driver_api *api = dev->driver_api;
                                       ~~~~~^~~~~~~~~~
ZEPHYR/zephyrproject/zephyr/include/drivers/flash.h: In function 'int z_impl_flash_erase(device*, off_t, size_t)':
ZEPHYR/zephyrproject/zephyr/include/drivers/flash.h:159:44: error: invalid conversion from 'const void*' to 'const flash_driver_api*' [-fpermissive]
  const struct flash_driver_api *api = dev->driver_api;
                                       ~~~~~^~~~~~~~~~
ZEPHYR/zephyrproject/zephyr/include/drivers/flash.h: In function 'int z_impl_flash_write_protection_set(device*, bool)':
ZEPHYR/zephyrproject/zephyr/include/drivers/flash.h:185:44: error: invalid conversion from 'const void*' to 'const flash_driver_api*' [-fpermissive]
  const struct flash_driver_api *api = dev->driver_api;
                                       ~~~~~^~~~~~~~~~
ZEPHYR/zephyrproject/zephyr/include/drivers/flash.h: In function 'size_t z_impl_flash_get_write_block_size(device*)':
ZEPHYR/zephyrproject/zephyr/include/drivers/flash.h:272:44: error: invalid conversion from 'const void*' to 'const flash_driver_api*' [-fpermissive]
  const struct flash_driver_api *api = dev->driver_api;


C++ support (Eclipse CDT4) - 'printk' could not be resolved #west

Leo
 

Hello!

I am failing to create a Zephyr project for Eclipse with C++ support.
Is there a working example or guide I can use as reference to set this up?
My end goal is to use Zephyr + nRF SDK in C++ with debugging in any IDE, preferably SEGGER or Eclipse.

After importing project "hello_world", Eclipse underlines function "printk" in red:
    ==> Function 'printk' could not be resolved <==
    ==> Symbol 'CONFIG_BOARD' could not be resolved <==

Here's the steps I follow to setup the project:
    Toolchain:
        Zephyr 2.0.0
        west v0.6.0
        ninja 1.9.0
        cmake 3.15.2
        Eclipse 4.12 + GNU MCU 4.5.1
    
    Edit prj.conf and .config:
        CONFIG_PRINTK=y
        CONFIG_STDOUT_CONSOLE=y
        CONFIG_NEWLIB_LIBC=y
        CONFIG_LIB_CPLUSPLUS=y
    
    Run:
        west build -b nrf52840_pca10056 C:/embedded/zephyrproject/zephyr/samples/hello_world -- -G"Eclipse CDT4 - Ninja" -D_ECLIPSE_VERSION=4.12
        One warning:
            <...>
            [18/98] Building CXX object CMakeFiles/app.dir/src/main.cpp.obj
            cc1plus.exe: warning: command line option '-Wno-pointer-sign' is valid for C/ObjC but not for C++
    
    Import project into Eclipse
        Error in main.cpp:
        Function 'printk' could not be resolved
    
    Also tried:
        set (CMAKE_CXX_STANDARD 11) in CMakeLists.txt
        Manually add "__cplusplus=201402L" as a symbol in Eclipse (cmake does not generate such symbol in .cproject)
        Force boilerplate.cmake to call eclipse_cdt4_generator_amendment with work mode = 2 (.cproject with __cplusplus)
    
Thanks!


API meeting: agenda

Carles Cufi
 

Hi all,

This week we will look at:

Agenda:

- Sensor API: Potential sharing between V4Z and rtio
- GPIO: Update on https://github.com/zephyrproject-rtos/zephyr/pull/16648 and possibly merging it

Additional items in the "Triage" column in the GitHub project may be discussed if time permits.
If you want an item included in the meeting, please add it to the GitHub project.

https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-Working-Group-Meetings#zephyr-api-discussion
https://github.com/zephyrproject-rtos/zephyr/projects/18
https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk/edit

Regards,

Carles


Re: Have someone a guide to use PPP with the module quectel GSM/GPRS M95? #protocol #driver #ppp

William Fish
 

Lucas,
Have a look at the Sara modem driver as a good starting point.

drivers/modem

Billy..


Have someone a guide to use PPP with the module quectel GSM/GPRS M95? #protocol #driver #ppp

Lucas Peixoto
 

Hello, I'm using a module named Quectel GSM/GPRS M95 to connect to the internet. Until now I'm using it with UART and AT commands, but I'm wondering to use the PPP that released in v2.0.0-rc2 version. This module has commands to activate the communication via PPP. I'm thinking to use the module's UART to receive and send the datagrams in the network, and these datagrams will be handle by PPP. How can I do this? Does anyone have an idea?


Re: NRF52832 debugging in eclipse #nrf52832 #jlink #debugging #eclipse

Maureen Helm
 

Does the application work without the debugger attached? (i.e., did it get programmed into flash correctly?)

 

I’ve seen weird behavior if you leave the GDB client executable at the default. Try changing this so it comes from the Zephyr SDK (or GNU Arm Embedded, if you’re using that toolchain instead).

 

From: users@... <users@...> On Behalf Of stefan.hristozov via Lists.Zephyrproject.Org
Sent: Thursday, August 29, 2019 4:19 AM
To: users@...
Cc: users@...
Subject: [Zephyr-users] NRF52832 debugging in eclipse #nrf52832 #jlink #debugging #eclipse

 

Hi,
i am trying to set up eclipse, gdb and jlink for debugging NRF52832. I am using a PCA10040 board with an integrated Jlink debugger.  I have a simple project with a single main.c file. My prj.conf are:

CONFIG_DEBUG=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_OPTIMIZATIONS=y
CONFIG_SYS_PM_DEBUG=y

I configured the debugger in eclipse as shown in the figures:




Unfortunately when I start the debug session the execution stops in the _find_fd_entry:






How to properly configure the debugger for debugging zephyrs applications?


Running Zephyr on Arty, #litex

ps.lindblad@...
 

Hi, I've been trying to get a Zephyr sample running on the Arty FPGA-board without succeeding.
I’ve tried both using the zephyr-sdk toolchain and cross-compile toolchain with the same unsatisfying result.
Litex boots fine and firmware is uploaded but then nothing.

Is there any working prebuilt Litex gateware – Zephyr firmware combination available to test with?

Thanks,
Stefan


printenv | grep ZEPHYR
ZEPHYR_TOOLCHAIN_VARIANT=zephyr
ZEPHYR_BASE=/home/stefan/FPGA/Zeph/zephyr
ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk/
stefan@virtLinux:~/FPGA/Zeph/zephyr$ ls
arch    CMakeLists.txt      doc      include         lib       modules     soc      version.h.in
boards  CODE_OF_CONDUCT.md  drivers  Kconfig         LICENSE   README.rst  subsys   west.yml
build   CODEOWNERS          dts      Kconfig.zephyr  Makefile  samples     tests    zephyr-env.cmd
cmake   CONTRIBUTING.rst    ext      kernel          misc      scripts     VERSION  zephyr-env.sh
stefan@virtLinux:~/FPGA/Zeph/zephyr$ west build -b litex_vexriscv samples/hello_world
-- west build: build configuration:
       source directory: /home/stefan/FPGA/Zeph/zephyr/samples/hello_world
       build directory: /home/stefan/FPGA/Zeph/zephyr/build
       BOARD: litex_vexriscv (origin: CMakeCache.txt)
-- west build: building application
ninja: no work to do.
stefan@virtLinux:~/FPGA/Zeph/zephyr$ lxterm --serial-boot --kernel build/zephyr/zephyr.bin /dev/ttyUSB1
[LXTERM] Starting....

        __   _ __      _  __
       / /  (_) /____ | |/_/
      / /__/ / __/ -_)>  <
     /____/_/\__/\__/_/|_|

 (c) Copyright 2012-2019 Enjoy-Digital
 (c) Copyright 2007-2015 M-Labs Ltd

 BIOS built on Aug 27 2019 22:09:58
 BIOS CRC passed (354dfde9)

 Migen git sha1: --------
 LiteX git sha1: 5a7b4c34

--============ SoC info ================--
CPU:       VexRiscv @ 100MHz
ROM:       32KB
SRAM:      32KB
L2:        8KB
MAIN-RAM:  262144KB

--========= Peripherals init ===========--
Initializing SDRAM...
SDRAM now under software control
Read leveling:
m0, b0: |11111100000000000000000000000000| delays: 03+-03
m0, b1: |00000000000011111111100000000000| delays: 16+-04
m0, b2: |00000000000000000000000000001111| delays: 30+-02
m0, b3: |00000000000000000000000000000000| delays: -
m0, b4: |00000000000000000000000000000000| delays: -
m0, b5: |00000000000000000000000000000000| delays: -
m0, b6: |00000000000000000000000000000000| delays: -
m0, b7: |00000000000000000000000000000000| delays: -
best: m0, b1 delays: 16+-04
m1, b0: |11111111100000000000000000000000| delays: 04+-04
m1, b1: |00000000000001111111111100000000| delays: 18+-05
m1, b2: |00000000000000000000000000000111| delays: 30+-01
m1, b3: |00000000000000000000000000000000| delays: -
m1, b4: |00000000000000000000000000000000| delays: -
m1, b5: |00000000000000000000000000000000| delays: -
m1, b6: |00000000000000000000000000000000| delays: -
m1, b7: |00000000000000000000000000000000| delays: -
best: m1, b1 delays: 18+-05
SDRAM now under hardware control
Memtest OK

--========== Boot sequence =============--
Booting from serial...
Press Q or ESC to abort boot completely.
sL5DdSMmkekro
[LXTERM] Received firmware download request from the device.
[LXTERM] Uploading build/zephyr/zephyr.bin to 0x40000000 (9608 bytes)...
[LXTERM] Upload complete (7.7KB/s).
[LXTERM] Booting the device.
[LXTERM] Done.
Executing booted program at 0x40000000
--============= Liftoff! ===============--







NRF52832 debugging in eclipse #nrf52832 #jlink #debugging #eclipse

Stefan Hristozov
 

Hi,
i am trying to set up eclipse, gdb and jlink for debugging NRF52832. I am using a PCA10040 board with an integrated Jlink debugger.  I have a simple project with a single main.c file. My prj.conf are:

CONFIG_DEBUG=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_OPTIMIZATIONS=y
CONFIG_SYS_PM_DEBUG=y

I configured the debugger in eclipse as shown in the figures:




Unfortunately when I start the debug session the execution stops in the _find_fd_entry:






How to properly configure the debugger for debugging zephyrs applications?


API meeting: agenda

Carles Cufi
 

Hi all,

This week we will look at:

Agenda:

- Sensor API: Update on progress
- GPIO: Update on https://github.com/zephyrproject-rtos/zephyr/pull/16648 and possibly merging it

Additional items in the "Triage" column in the GitHub project may be discussed if time permits.
If you want an item included in the meeting, please add it to the GitHub project.

https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-Working-Group-Meetings#zephyr-api-discussion
https://github.com/zephyrproject-rtos/zephyr/projects/18
https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk/edit

Regards,

Carles


Re: Adding SOC EFR32MG13P linking issue

Kumar Gala
 

On Aug 26, 2019, at 4:52 PM, via Lists.Zephyrproject.Org <marianoizzi=yahoo.com@lists.zephyrproject.org> wrote:

Hi,

I'm trying to use Zephyr on a Silabs board already supported (efr32_slwstk6061a) but with a different SOC; the EFR32MG13P.

What I did was copying all the EFR32MG12P related files, renamed them to EFR32MG13P and edited their content (memory size mostly)

Also I created a new board (efr32mg13_slwstk6061a) and add it as an option on all the config files.

Finally I added the lib and hal files for the new SOC.

So far I was able to compile but NOT TO LINK the sample project.
The project with the original board/SOC links fine.

I'm attaching the log, seems to me linker path issue; but I'm new with cmake and don't know how to fix it.
If you can share your work on GitHub, it will probably be easier to try and see what might be going on.

- k


Adding SOC EFR32MG13P linking issue

Mariano Izzi <marianoizzi@...>
 

Hi,

I'm trying to use Zephyr on a Silabs board already supported (efr32_slwstk6061a) but with a different SOC; the EFR32MG13P.

What I did was copying all the EFR32MG12P related files, renamed them to EFR32MG13P and edited their content (memory size mostly)

Also I created a new board (efr32mg13_slwstk6061a) and add it as an option on all the config files.

Finally I added the lib and hal files for the new SOC.

So far I was able to compile but NOT TO LINK the sample project.
The project with the original board/SOC links fine.

I'm attaching the log, seems to me linker path issue; but I'm new with cmake and don't know how to fix it.

Best Regards,
Mariano Izzi


Re: #bluetooth #nrf52832 #bt #bluetooth #nrf52832 #bt

Carles Cufi
 

Hi there,

 

There was recently a similar question on Slack.

Take a look at https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/mesh/crypto.c

BLE Mesh has a similar requirement to encrypt/decrypt contents of advertising packets.

 

Carles

 

From: users@... <users@...> On Behalf Of 1606140 via Lists.Zephyrproject.Org
Sent: 25 August 2019 13:53
To: users@...
Cc: users@...
Subject: [Zephyr-users] #bluetooth #nrf52832 #bt

 

Hi, all.  I am encrypting the UUID of my beacon and wants to decrypt it at the scanner's end. But the problem is that the docs say only about encryption function bt_encrypt_be(). How do I decrypt my UUID at the scanner's end?. 
Also, what's the difference if I use bt_encrypt_le() instead of bt_encrypt_be() ? (I'm not a crypto pro here)   


#bluetooth #nrf52832 #bt #bluetooth #nrf52832 #bt

1606140@...
 

Hi, all.  I am encrypting the UUID of my beacon and wants to decrypt it at the scanner's end. But the problem is that the docs say only about encryption function bt_encrypt_be(). How do I decrypt my UUID at the scanner's end?. 
Also, what's the difference if I use bt_encrypt_le() instead of bt_encrypt_be() ? (I'm not a crypto pro here)   


Re: GPIO support on nRF52840 DK

Leo
 

That makes sense!

I stand corrected; the interrupt is raised just as it is in the button example!
I am not quite sure why it didn't trigger before but it must have been a result of playing around with these files.

Thanks,
Leo


Re: Test if a given GPIO is interruptible #gpio #dts

Bolivar, Marti
 

Hello again :)

"leonardomt via Lists.Zephyrproject.Org"
<leonardomt=gmail.com@lists.zephyrproject.org> writes:

Is there a way to detect programmatically if a given pin can be configured as interrupt using Zephyr? (e.g. some sort of a map/list or macros that I could reuse).
Are there any side effects in configuring a pin as an interrupt if it didn't have such hardware capability?
Is this information listed in a dts or yaml file or is the only
approach to search with a vendor's datasheet if a pin has an
interrupt?
I would say that if the hardware supports interrupts, then the Zephyr
GPIO driver for it should as well. Otherwise, it's a bug in the driver.


What I would like to do is to configure pins dynamically, so that at a
given point a GPIO pin is configured as a digital output and later on
it is configured as a digital input; if it is interruptible, use that
feature preferably, otherwise check its state in a loop.
As far as I know, in general this problem needs to be solved by knowing
the hardware. There are all sorts of GPIO chips out there.


Thank you!


Re: GPIO support on nRF52840 DK

Bolivar, Marti
 

"leonardomt via Lists.Zephyrproject.Org"
<leonardomt=gmail.com@lists.zephyrproject.org> writes:

This worked, although this pin in particular did not trigger the interrupt function but required calling gpio_pin_read(...) inside a loop to detect changes in its state.
Thanks for the fix and the walk-thru!
Sure thing!


What thought process or what resource/documentation makes one realize
that pin P1.0 belongs to port DT_ALIAS_GPIO_1_LABEL?

For example, I found that P1.0 (D1) belongs to port "gpio1" by looking at the gpio-map definition in nrf52840_pca10056.dts; as you suggested, generated_dts_board_unfixed.h lists that "GPIO_1" is assigned to DT_NORDIC_NRF_GPIO_50000300_LABEL and finally that DT_ALIAS_GPIO_1_LABEL = DT_NORDIC_NRF_GPIO_50000300_LABEL... but is this the only way to know what's where?
Port 1 is the GPIO controller; the .0 is a pin number it
controls. You want the device label for the controller -- as
you've seen, the pin number is a separate piece of data.

You can look at the DTS files to know what nodes are available:

https://github.com/zephyrproject-rtos/zephyr/blob/master/dts/arm/nordic/nrf52840.dtsi#L126

This dtsi (Device Tree Source Include) is included from the .dts
file for the board, which you can find by searching for its name
in boards/*/:

https://github.com/zephyrproject-rtos/zephyr/blob/master/boards/arm/nrf52840_pca10056/nrf52840_pca10056.dts

The nodes have the addresses of the hardware peripherals they
correspond to, so you can find the one you want by comparing your
chip memory map with the DT reg property. (But usually, they're
numbered according to the same peripheral numbering in the chip
reference manual, so P1 means you're looking for GPIO_1. And
similarly for other types of peripheral, like SPI_1, I2C_3, etc.)

Marti


Thanks


Test if a given GPIO is interruptible #gpio #dts

Leo
 

Is there a way to detect programmatically if a given pin can be configured as interrupt using Zephyr? (e.g. some sort of a map/list or macros that I could reuse).
Are there any side effects in configuring a pin as an interrupt if it didn't have such hardware capability?
Is this information listed in a dts or yaml file or is the only approach to search with a vendor's datasheet if a pin has an interrupt?

What I would like to do is to configure pins dynamically, so that at a given point a GPIO pin is configured as a digital output and later on it is configured as a digital input; if it is interruptible, use that feature preferably, otherwise check its state in a loop.

Thank you!


Re: GPIO support on nRF52840 DK

Leo
 

This worked, although this pin in particular did not trigger the interrupt function but required calling gpio_pin_read(...) inside a loop to detect changes in its state.
Thanks for the fix and the walk-thru!

What thought process or what resource/documentation makes one realize that pin P1.0 belongs to port DT_ALIAS_GPIO_1_LABEL?

For example, I found that P1.0 (D1) belongs to port "gpio1" by looking at the gpio-map definition in nrf52840_pca10056.dts; as you suggested, generated_dts_board_unfixed.h lists that "GPIO_1" is assigned to DT_NORDIC_NRF_GPIO_50000300_LABEL and finally that DT_ALIAS_GPIO_1_LABEL = DT_NORDIC_NRF_GPIO_50000300_LABEL... but is this the only way to know what's where?

Thanks


Adding a Sensor LSM9DS1

Lawrence King
 

I am trying to add a sensor to my project. I have already verified that it is electrically connected to the i2c bus correctly with a simple test program which reads the WHO_AM_I register using direct i2c_transfer calls:

 

struct i2c_msg msgs[1];

 

msgs[0].buf = data;

msgs[0].len = num_bytes;

msgs[0].flags = I2C_MSG_READ | I2C_MSG_STOP;

 

return i2c_transfer(i2c_dev, &msgs[0], 1, addr);

 

Now I want to enable the sensor subsystem, that seems easy enough, just add a few lines to the prj.conf file:

CONFIG_SENSOR=y

CONFIG_SENSOR_LOG_LEVEL_INF=y

CONFIG_SENSOR_LOG_LEVEL=3

CONFIG_SENSOR_INIT_PRIORITY=90

 

And finally since the drivers are already in the zephyrproject tree, I want to use the LSM9DS1 drivers that are in modules/hal/st/sensor/stmemsc/lsm9ds1_STdC/driver

 

Here is where I get stuck, I know I need to add a few things:

  1. A device tree entry under i2c0
  2. Descriptions of which interrupt pins from the sensor are connected to which gpios added to the device tree
  3. Convince west or cmake to bring in the source from modules and compile it into the build

 

‘ninja menuconfig’ doesn’t know anything about the external modules, although west build did put the name of the directory in build/zephyr_modules.txt

 

I couldn’t find any examples even for other sensors in the zephyr/samples directory, or in the zephyrproject documentation (although but I may have missed it).

 

Does someone have an example of the device tree entries, and the build process for an external sensor module?

 

Lawrence King

Principal Developer

Connected Transport Market Unit

https://www.Irdeto.com

+1(416)627-7302

 

1  2 - linkedin  3 - instagram  4 - youtube  6 - facebook  7

            

CONFIDENTIAL: This e-mail and any attachments are confidential and intended solely for the use of the individual(s) to whom it is addressed. It can contain proprietary confidential information and be subject to legal privilege and/or subject to a non-disclosure Agreement. Unauthorized use, disclosure or copying is strictly prohibited. If you are not the/an addressee and are in possession of this e-mail, please delete the message and notify us immediately. Please consider the environment before printing this e-mail. Thank you.

 

 

 

801 - 820 of 2455