Date   

test coverage

novello
 

In a x86_64 ubuntu 18.04

I have made this test :
/scripts/sanitycheck --all --enable-slow
and it work .

I have made those test and I get the result  and is fine.
sanitycheck --coverage -p native_posix -T tests/kernel

Those test. and thay work.
sanitycheck --device-testing --device-serial /dev/ttyACM0 -p frdm_k82f -T tests/kernel

I can't do this test.
sanitycheck --coverage --device-testing --device-serial /dev/ttyACM0 -p frdm_k82f  -T tests/kernel
May someone  help me ?
Best Regards
Novello G.


Re: HAL architecture

Noëlle Clement
 

{sent again because I forgot to also send it to the mailing list!} 

Thank you a lot both! 
Over the past few weeks I've unexpectedly had to work on some other part of the board port, so only now I'm starting on the low power management.

The good news is that by now I also have a bit better understanding of Zephyr and the power management, partially thanks to your advice! However, now that I've actually started on this part, I have many questions. I thought it would be more useful to ask through the mailing list, in case Francois is busy. The power management is crucial for our application, which is part of a prototype I'm developing for my Bachelor thesis, and I'm on a tight schedule haha. 

I have looked through the PR Erwan mentioned, regarding the low power support for the STM32L4, but there's still some parts that are raising questions. 

Some extra technical details:
- We use the STM32L151CC on our custom board. This board has already been ported by me (or at least the configuration part required for flashing and running the application).
- We need to use the stop mode with RTC
- During 'normal' operation the HSI is used, during the stop mode the LSE is used 
- If I understood correctly, currently the wake up is caused through a timed interrupt from the RTC 

Some of my questions are:
1. In this issue (https://github.com/zephyrproject-rtos/zephyr/issues/19755) only a few series part of the STM32 family are mentioned. Does this mean that low power management is already supported in Zephyr as-is for the other series (like the STM32L1xxx series), or just that they are not a priority or the like?
2. Why was it necessary to create a power.c file specifically for the STM32L4XXX? Is that always required for the STM32 SOCs, or was it only because the sleep modes didn't 'align' with the stop modes?
3. In the (modules/hal/stm32/stm32cube/stm32l1xx/drivers/include/) 'stm32l1xx_ll_pwr.h' file I can't find variables specifying specific stop modes, like in the 'stm32l4xx_ll_pwr.h' file. Why is this the case? How will I specify the specific stop mode if it's not in the HAL? 
4. Are there still things that need to be included / written in the application source, for the power management to work properly, with the way it was set up for the STM32L4xxx (creating the separate power.c file)?

There's a bit of overlap in these questions, as you may have noticed. I guess the main question is 'help, I'm not sure how to set up the power management', since I'm simultaneously learning about power management configuration and how this is done in Zephyr. But I tried to give more direction where I'm most confused haha.
  
Have a great day!


From: Erwan Gouriou <erwan.gouriou@...>
Sent: Thursday, June 4, 2020 5:06 PM
To: Cufi, Carles <Carles.Cufi@...>
Cc: Noëlle Clement <n.clement@...>; users@... <users@...>; Glaropoulos, Ioannis <Ioannis.Glaropoulos@...>; Francois RAMU <francois.ramu@...>
Subject: Re: HAL architecture
 
Additionally to Carles's answer, let me point you to an on going PR that aims at implementing lp modes on stm32:

It only supports L4/WB series for now, but you can contact François in CC if you have some questions to adapt this to your use case.

Cheers

On Thu, 4 Jun 2020 at 16:58, Cufi, Carles <Carles.Cufi@...> wrote:

Hi Noëlle,

 

Thanks for the kind words.

You can use CMSIS, which is built-in with Zephyr, for WFI.

 

Simply use:

 

__WFI();

 

in your C code.

 

The definition is here:

https://github.com/zephyrproject-rtos/cmsis/blob/master/CMSIS/Core/Include/cmsis_gcc.h#L909

 

That said, are you sure you  need to invoke the WFI instruction manually? this is automatically done by Zephyr when the core can be powered down, for example:

https://github.com/zephyrproject-rtos/zephyr/blob/master/arch/arm/core/aarch32/cpu_idle.S#L101

 

Thanks,

 

Carles

 

From: users@... <users@...> On Behalf Of Noëlle Clement via lists.zephyrproject.org
Sent: 04 June 2020 15:09
To: users@...
Subject: [Zephyr-users] HAL architecture

 

Hi everyone!

 

First of all: thanks specifically to Carles Cufi for taking the time a few months ago to give very detailed answers to my questions on whether Zephyr would be a right choice for our device. Partially because of this we're going with Zephyr for now - at least for the upcoming phase where I'm going to develop a prototype!

 

The first step for this prototype is making sure that the OS actually supports the low power mode we need to still meet our battery life requirements. Some context:

- We use the STM32L151CC MCU

- We need to be able to request the WFI (wait_for_interrupt) instruction (we use that one right now)

- In our current (bare-metal) code we use CMSIS +  a separate library (STM32 Standard Peripheral Library), of which the latter actually includes functions for requesting low power modes (including WFI)

 

I'm trying to figure out whether this specific instruction is already part of the HAL of Zephyr for the STM32Lxx MCU's. However, I'm kind of getting lost in the code, since the abstraction seems to be dispersed over multiple locations. I've looked into the documentation of course, but wasn't able to find an answer for my specific question. 

 

It would help me tremendously if someone could point me in the right direction or give a summary of the architecture, so I can check whether it's already supported or can start with implementing it myself.

 

Quick note that I'm relatively new to this, so if you need more information to understand my question or help me, I'm happy to provide it!

 

All the best,

Noelle 

 


How to write, compile and run in native_posix board with USB-CH341A converter #driver

honestech
 

Hello, everyone.
I am a beginner in zephyr RTOS. I want to make and run SPI driver with USB-CH341(SPI/I2C) programmer. I got the linux driver for it.
Here is a link.https://github.com/gschorcht/spi-ch341-usb
I have compiled and loaded this driver on Ubuntu 18.04 LTS. Then I can call this device like "/dev/spidev0.0".
I wrote the test code and tested, but I used the linux functions such as open, ioctl etc.

    ...
int spi = open("/dev/spidev0.1", O_RDWR);
    ...
ret = ioctl(spi, SPI_IOC_WR_MODE, &mode);
   ...

Now I want to make the driver for this device that can be used in zephyr native_posix board to test some SPI LCDs.
I have read the zephyrproject help and referenced its github samples. but I have got stuck. :-/

Could you tell me how to make, build and test?
I need much more help. I want to like this forum. :)

Thanks in advance.
Pengxiang


Re: device_get_binding() returns NULL #i2c #sensor

Jeremy Herbert
 

Have you tried to connect a logic analyser to your I2C pins to see if there are any transactions occurring?

Thanks,
Jeremy

On Sat, 27 Jun 2020 at 12:12, <straton.florin.c@...> wrote:

Hi,

I am trying to connect a BME280 sensor to NXP MiMX RT1020 and run samples/sensor/bme280 application but the output is always 

[00:00:00.000,000] <dbg> BME280.bme280_init: initializing BME280
[00:00:00.000,000] <dbg> BME280.bme280_chip_init: ID read failed: -5
[00:00:00.000,000] <dbg> BME280.bme280_init: BME280 failed
*** Booting Zephyr OS build v2.3.0-rc1-384-g8b5b7fcf8d84  ***
No device "BME280" found; did initialization fail?


the board overlay that i created is 

&lpi2c4 {
	bme280@76 {
		compatible = "bosch,bme280";
		reg = <0x76>;
		label = "BME280";
	};
};
i don't have any idea what could be wrong

clearly i'm a newbie not only with zephyr

 


device_get_binding() returns NULL #i2c #sensor

straton.florin.c@...
 

Hi,

I am trying to connect a BME280 sensor to NXP MiMX RT1020 and run samples/sensor/bme280 application but the output is always 

[00:00:00.000,000] <dbg> BME280.bme280_init: initializing BME280
[00:00:00.000,000] <dbg> BME280.bme280_chip_init: ID read failed: -5
[00:00:00.000,000] <dbg> BME280.bme280_init: BME280 failed
*** Booting Zephyr OS build v2.3.0-rc1-384-g8b5b7fcf8d84  ***
No device "BME280" found; did initialization fail?


the board overlay that i created is 

&lpi2c4 {
	bme280@76 {
		compatible = "bosch,bme280";
		reg = <0x76>;
		label = "BME280";
	};
};
i don't have any idea what could be wrong

clearly i'm a newbie not only with zephyr

 


CAn STM32F446VET6 micro usb , re-enumerated as mass storage or as camera interface?

ramuvsign@...
 

I have STM32F446VET6 devkit from https://www.96boards.org/product/stm32/.  Is it possible to use micro USB ie.,On-board ST-LINK debugger/programmer this USB by re-enumeration as mass storage?
If possible, please provide the sources.


SDK 0.11.4 Release

Kumar Gala
 

Hi,

Some minor fixes related to newlib and a packaging related fix for the individual arch toolchain packages (missing the cmake files)

The SDK can be found here:

https://github.com/zephyrproject-rtos/sdk-ng/releases/tag/v0.11.4

Please download and try things out and report any issues.

- General:
* Fixed issue with cmake files not being installed in arch specific
toolchan packages

- newlib:
* Fix setting of -DMISSING_SYSCALL_NAMES consistent on all builds
* Set march=pentium for 32-bit x86 build

- k


WINC1500 driver... #WINC1500

rdsingh@...
 

Is this driver a working/tested implementation? Or this is never debugged on real hardware?

It seems that currently it fails to work beyond reading the MAC address of the WINC1500 module. When stepped through with the help of Eclipse debugging extension, it seems to be failing at the point where SPI bulk write is performed.

Can someone who worked on this driver elaborate on this. Am I missing something obvious?

regards,
RDS


Re: [EXT] [Zephyr-users] Custom Ethernet driver and IPv4 #ipv4 #ethernet #networking

Andrei Gansari
 

Hello,

 

Have you added ETH_NET_DEVICE_INIT In your code?

Do you have CONFIG_NET_IPV4=y set in your application?

 

What sample are you using?

You can have a look at enc28j60 code, that is an SPI ethernet device as well.

 

From: users@... <users@...> On Behalf Of m.vermeulen via lists.zephyrproject.org
Sent: Wednesday, June 24, 2020 3:40 PM
To: users@...
Subject: [EXT] [Zephyr-users] Custom Ethernet driver and IPv4 #ipv4 #ethernet #networking

 

Caution: EXT Email

I am working to implement a driver for a SPI Ethernet controller.

The code is being called at initialization, but I am stuck at testing the driver. I would like to use the Net Shell, so net ping xxx.xxx.xxx.xxx for example. Unfortunately, I notice that the code fails in net_icmpv4_send_echo_request() when checking iface->config.ip.ipv4.

Do I need to take extra steps to use IPv4 over my custom ethernet driver, beside enabling the driver and net shell? I could image I would have to bind my ethernet interface to the network stack somewhere, but I haven't found exactly where.


Re: [Zephyr-devel] Zephyr HCI Mesh Support

Johan Hedberg
 

Hi Vivek,

On 23. Jun 2020, at 20.32, Vivek Rajpara via lists.zephyrproject.org <vivek.rajpara=volansystech.com@...> wrote:
We are looking for the solution where we need to use Meshctl on Linux host and control the Zephyr based BT with it, can you please let us know if this support is enabled in Zephyr or not?
Looking forward to hearing from you as it is a crucial design factor for us.

Below is our setup
nrf52840(as BT HCI controller) + Arm processor with Linux (we are using bluez 5.50 meshctl tool)

I can see BT_HCI_MESH_EXT config, but it can't be enabled from menuconfig, I tried to enable it in project configuration but still, I can't send any command from meshctl to zephyr yet.
As far as I know, the BT_HCI_MESH_EXT option is for HCI vendor extensions which haven’t been implemented yet. However, BlueZ doesn’t require or even support them, so this should be a non-issue, meaning you should be able to use BlueZ (and its mesh stack) just fine with the Zephyr controller.

Johan


Custom Ethernet driver and IPv4 #ipv4 #ethernet #networking

Maik Vermeulen
 

I am working to implement a driver for a SPI Ethernet controller.

The code is being called at initialization, but I am stuck at testing the driver. I would like to use the Net Shell, so net ping xxx.xxx.xxx.xxx for example. Unfortunately, I notice that the code fails in net_icmpv4_send_echo_request() when checking iface->config.ip.ipv4.

Do I need to take extra steps to use IPv4 over my custom ethernet driver, beside enabling the driver and net shell? I could image I would have to bind my ethernet interface to the network stack somewhere, but I haven't found exactly where.


Zephyr HCI Mesh Support

Vivek Rajpara <vivek.rajpara@...>
 

Hello,

We are looking for the solution where we need to use Meshctl on Linux host and control the Zephyr based BT with it, can you please let us know if this support is enabled in Zephyr or not?
Looking forward to hearing from you as it is a crucial design factor for us.

Below is our setup
nrf52840(as BT HCI controller)  + Arm processor with Linux (we are using bluez 5.50 meshctl tool)

I can see BT_HCI_MESH_EXT config, but it can't be enabled from menuconfig, I tried to enable it in project configuration but still, I can't send any command from meshctl to zephyr yet.

Thanks in advance.
Regards,
Vivek Rajpara
Volansys Technologies Pvt. Ltd.
ISO 9001:2015 Certified
volansys technologies pvt. ltd.
www.volansys.com


This message contains confidential information and is for the intended recipients. If you are not intended recipients you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender or VOLANSYS (www.volansys.com) therefore does not accept liability for any errors or omissions in the contents of this message.


API meeting: agenda

Carles Cufi
 


#WINC1500 #nrf52832 #spi #driver #spi #driver #WINC1500 #nrf52832

rdsingh@...
 

Hi all,
I would like to know the status of WINC1500 driver in zephyr. Is this fully tested?

We are currently working on a product that uses Nordic's nRF52832 with WINC1500 over SPI. For our development setup, we are using nRF52-DK (PCA10040) board.

We have connected WINC1500-XPRO board to nRF-DK on SPI_1 (P2/P8) and for the IRQ - P0.17.

Here is our DTS overlay that we have placed for our setup as nrf52dk_nrf52832.overlay in samples/net/wifi/boards

&spi1 {
compatible = "nordic,nrf-spi";
status = "okay";
cs-gpios = <&gpio0 3 0>;
sck-pin = <31>;
mosi-pin = <30>;
miso-pin = <29>;
 
winc1500@0 {
status = "okay";
compatible = "atmel,winc1500";
reg = <0x0>;
label = "winc1500";
spi-max-frequency = <4000000>;
irq-gpios = <&gpio0 17 1>;
reset-gpios = <&gpio0 4 1>;
enable-gpios = <&gpio0 28 0>;
 
};
};

And here is the nrf52dk_nrf52832.conf we have placed in samples/net/wifi/boards
CONFIG_GPIO=y
CONFIG_SPI=y
CONFIG_SPI_1=y

CONFIG_LEGACY_TIMEOUT_API=y

CONFIG_WIFI_WINC1500=y
CONFIG_WIFI_WINC1500_REGION_NORTH_AMERICA=y

Here is the command line used for building this sample for this setup - 

rajas-imac:zephyr rdsingh$ west build -p auto -b smtio_nrf52 samples/net/wifi -- -G"Eclipse CDT4 - Ninja"

rajas-imac:zephyr rdsingh$ west flash


When we tried to run samples/net/wifi with this setup here are our observations - 

 - WINC1500 driver still uses Legacy timeout API and requires CONFIG_LEGACY_TIMEOUT_API=y

Once we fixed this, the driver initializes WINC1500 and reads the MAC address from it successfully. After this step, if fails to set the Region, Power level etc and hence fails all commands from the shell. We are not sure if this is an issue with the WINC1500 driver or with the nrfx_SPI drivers. Would love get some insight from someone who already have worked on this driver, if possible. We can commit some of our resources to get this driver fully debugged and working with the following boards - 
- nRF52-DK as described here and SAMD21-XPRO with WINC1500-XPRO connected on EXT1.

We would love to contribute to this driver in terms of making it work.

I see that there is a on going pull request that addresses Legacy timeout API fix in drivers/wifi/winc1500/wifi_winc1500.c but it fixes only one occurance!!

We look forward to guidance and help here.

regards,
RDS


Re: Need help in configuring ip address from telnet or ssh #nrf52840

Jukka Rissanen
 

Hi,

there is net_if_ipv4_addr_add() function that can be used to add an IPv4 address to the network interface at runtime.

Cheers,
Jukka


On Thu, 2020-06-18 at 01:44 -0700, giriprasad@... wrote:
Hi Team,

Following is my requirement, please go through and please suggest a possible method for me.

I had PCA10056(NRF52840) board with me. It will be having a default IPV4 address when the device gets booted. My requirement is that the user should be able to set the ip_address of his preference to the board at run time. He can use telnet or ssh or any other protocol with an ethernet interface. Please suggest the possible solution for this requirement.

Thanks & Regards,
Giri Prasad N.


Need help in configuring ip address from telnet or ssh #nrf52840

giriprasad@...
 

Hi Team,

Following is my requirement, please go through and please suggest a possible method for me.

I had PCA10056(NRF52840) board with me. It will be having a default IPV4 address when the device gets booted. My requirement is that the user should be able to set the ip_address of his preference to the board at run time. He can use telnet or ssh or any other protocol with an ethernet interface. Please suggest the possible solution for this requirement.

Thanks & Regards,
Giri Prasad N.


Re: how to provide own out of tree implementation/replacement of existing driver

Jan Pohanka
 

'imply' would probably be a good idea here.
By then I will live with custom patches to the main tree, thanks for support.

st 17. 6. 2020 v 18:45 odesílatel Bolivar, Marti
<Marti.Bolivar@...> napsal:


Maybe we can work towards removing the 'select' statements in those
cases and using 'imply' instead?

https://github.com/torvalds/linux/commit/237e3ad0f195d8fd34f1299e45f04793832a16fc

"Cufi, Carles" <Carles.Cufi@...> writes:

Hi Jan,

This has been done in the past in the following way:

https://github.com/zephyrproject-rtos/zephyr/blob/master/drivers/entropy/Kconfig.nrf5#L7

It's not ideal, but it's the only current solution I am aware of.

Regards,

Carles

-----Original Message-----
From: users@... <users@...> On
Behalf Of Jan Pohanka via lists.zephyrproject.org
Sent: 17 June 2020 08:48
To: Bolivar, Marti <Marti.Bolivar@...>
Cc: Zephyr-users@...
Subject: Re: [Zephyr-users] how to provide own out of tree
implementation/replacement of existing driver

Hello,
yes, but I'm afraid that this would work only in simplest cases eg.
when an in-tree driver is not selected as dependency etc...

út 16. 6. 2020 v 23:07 odesílatel Bolivar, Marti
<Marti.Bolivar@...> napsal:

Hi,

You should be able to just disable the in-tree driver using Kconfig
and use your own out of tree driver.

"Jan Pohanka via lists.zephyrproject.org"
<xhpohanka=gmail.com@...> writes:

Hello,

I would like to use my own implementation of an existing driver. Is
there any way to do that? I have found an amend feature in
https://github.com/zephyrproject-rtos/zephyr/pull/19980 but I cannot
make it work. If I understand correctly it is intended more to add
some functionality than completely replace.
In my use-case it would be probably easier to use out of tree
implementation for some time than maintain patches for the main
tree.
In fact I need just to add support for new soc from the stm32 family
that is not yet in existing drivers (clock, watchdog, ethernet,
etc).
Later when our code is polished, I will prepare pull-requests.

best regards
Jan


Re: Seeed BLE Micro (nrf51822) hangs on k_msleep

Matias N.
 

Thanks, I opened the issue. Don't know how to assign the issue to you, though.

On Wed, Jun 17, 2020, at 02:01, Chettimada, Vinayak Kariappa wrote:

Hi Matias,

 

Please create a github issue detailing the steps to reproduce, please mention the diff/changes of the upstream master samples you are using. Also upload the “.config” file of your build.

You can assign it to me, for starters.’

 

That said, be stuck at sleep/WFI indicates stopped 32KHz clock due to missing/damaged external crystal and misconfigure LFCLOCK source.

 

Regards,

Vinayak

 

From: users@... <users@...> On Behalf Of Matias N. via lists.zephyrproject.org
Sent: 16 June 2020 23:29
To: Vinayak Kariappa <vinayak.kariappa@...>
Cc: users@...
Subject: Re: [Zephyr-users] Seeed BLE Micro (nrf51822) hangs on k_msleep

 

Hi,

sorry for the delay. I just tried your suggestion and it does not seem to make a difference. As I mentioned, on debugging it seems to be halted at the WFI instruction. From my understanding, there should be an interrupt firing via the RTC but this is not happening and the MCU does not get out of the WFI (I placed a breakpoint at the rtc1_nfr_isr) and it never reaches there.

 

I also tried to simply modify the in-tree board definition for BLE nano, changing the LED gpio pin and setting the appropriate UART pins for my board and then flashing the blinky sample. I got the same result of the LED staying fixed.

 

Furthermore, the board came with nordic's UART/BLE demonstration firmware and this works (I can bind from my phone) so I would rule out defective hardware.

 

I can't really understand what could be happening. Any idea on what I should try?

 

Best,

Matias

 

On Wed, Jun 10, 2020, at 21:42, Vinayak Kariappa wrote:

Hi Matias,

 

From the schematics posted in seedstudio website, indeed a 32KHz crystal is said to be present. You may always use the internal 32 KHz RC oscillator in nRF51 to check if the system timer is not the problem.

 

Enable the following to use RC Oscillator:

CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y

CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y

 

16MHz clock is essential for 2.4 GHz radio peripheral.

 

Regards,

Vinayak

 

On Sat, Jun 6, 2020 at 5:31 AM Matias N. <matias@...> wrote:

 

Hi,

I'm starting a project based on the BLE Micro module from Seeedstudio. Since this "board" was not supported but the RedBear BLE nano board is the most similar one, I created a custom board directory for it using this as a template. I managed to flash the blinky sample to the module (using openocd and a ST-Link v2 clone device) and can also connect with gdb to debug. I have this module soldered to a custom PCB which features a LED and thus I set the correct LED GPIO in the dts file. I managed to control the LED but from my debugging it seems to hang when calling k_msleep(). When it hangs, if I pause the execution it appears to be right after the "wfi" instruction (i'm assuming the debugger breaks the sleep).

 

I'm not sure why this could be happening. My guess it is something to do with the clock configuration. The module features a 32.768hz crystal (just like the BLE Nano) but also a 16 MHz crystal (which I'm not sure is used or not by zephyr). I tried disabling tickless, but the behavior does not change.

 

As I'm new to zephyr I'm not quite sure what else to check. Googling for this problem I found old issues in GitHub relating to tickless mode, low-power, rtc, etc. But all seem to be merged/closed. I would appreciate any help in this.

 

Best,

Matias

 

 

 



Re: how to provide own out of tree implementation/replacement of existing driver

Bolivar, Marti
 

Maybe we can work towards removing the 'select' statements in those
cases and using 'imply' instead?

https://github.com/torvalds/linux/commit/237e3ad0f195d8fd34f1299e45f04793832a16fc

"Cufi, Carles" <Carles.Cufi@...> writes:

Hi Jan,

This has been done in the past in the following way:

https://github.com/zephyrproject-rtos/zephyr/blob/master/drivers/entropy/Kconfig.nrf5#L7

It's not ideal, but it's the only current solution I am aware of.

Regards,

Carles

-----Original Message-----
From: users@... <users@...> On
Behalf Of Jan Pohanka via lists.zephyrproject.org
Sent: 17 June 2020 08:48
To: Bolivar, Marti <Marti.Bolivar@...>
Cc: Zephyr-users@...
Subject: Re: [Zephyr-users] how to provide own out of tree
implementation/replacement of existing driver

Hello,
yes, but I'm afraid that this would work only in simplest cases eg.
when an in-tree driver is not selected as dependency etc...

út 16. 6. 2020 v 23:07 odesílatel Bolivar, Marti
<Marti.Bolivar@...> napsal:

Hi,

You should be able to just disable the in-tree driver using Kconfig
and use your own out of tree driver.

"Jan Pohanka via lists.zephyrproject.org"
<xhpohanka=gmail.com@...> writes:

Hello,

I would like to use my own implementation of an existing driver. Is
there any way to do that? I have found an amend feature in
https://github.com/zephyrproject-rtos/zephyr/pull/19980 but I cannot
make it work. If I understand correctly it is intended more to add
some functionality than completely replace.
In my use-case it would be probably easier to use out of tree
implementation for some time than maintain patches for the main
tree.
In fact I need just to add support for new soc from the stm32 family
that is not yet in existing drivers (clock, watchdog, ethernet,
etc).
Later when our code is polished, I will prepare pull-requests.

best regards
Jan


Re: how to provide own out of tree implementation/replacement of existing driver

Carles Cufi
 

Hi Jan,

This has been done in the past in the following way:

https://github.com/zephyrproject-rtos/zephyr/blob/master/drivers/entropy/Kconfig.nrf5#L7

It's not ideal, but it's the only current solution I am aware of.

Regards,

Carles

-----Original Message-----
From: users@... <users@...> On
Behalf Of Jan Pohanka via lists.zephyrproject.org
Sent: 17 June 2020 08:48
To: Bolivar, Marti <Marti.Bolivar@...>
Cc: Zephyr-users@...
Subject: Re: [Zephyr-users] how to provide own out of tree
implementation/replacement of existing driver

Hello,
yes, but I'm afraid that this would work only in simplest cases eg.
when an in-tree driver is not selected as dependency etc...

út 16. 6. 2020 v 23:07 odesílatel Bolivar, Marti
<Marti.Bolivar@...> napsal:

Hi,

You should be able to just disable the in-tree driver using Kconfig
and use your own out of tree driver.

"Jan Pohanka via lists.zephyrproject.org"
<xhpohanka=gmail.com@...> writes:

Hello,

I would like to use my own implementation of an existing driver. Is
there any way to do that? I have found an amend feature in
https://github.com/zephyrproject-rtos/zephyr/pull/19980 but I cannot
make it work. If I understand correctly it is intended more to add
some functionality than completely replace.
In my use-case it would be probably easier to use out of tree
implementation for some time than maintain patches for the main
tree.
In fact I need just to add support for new soc from the stm32 family
that is not yet in existing drivers (clock, watchdog, ethernet,
etc).
Later when our code is polished, I will prepare pull-requests.

best regards
Jan