Re: [users] Re: Re: Re: Re: Re: STM32F103x port
Nashif, Anas
On 14/03/2016, 22:46, "Kalowsky, Daniel" <daniel.kalowsky(a)intel.com> wrote:
-----Original Message----- I am working right now on defining a new layer in Kconfig and reorganising Kconfig for this purpose and will take the STM32 changes and propose better structure for all architectures and existing SoCs. Anas
|
|
Re: [users] Re: Re: Re: Re: Re: STM32F103x port
Kalowsky, Daniel <daniel.kalowsky@...>
toggle quoted messageShow quoted text
-----Original Message----- <..snip..> Sorry I was out of the office today, and most likely delayed Anas's hope of delivering a solution by EOD. That said, he reviewed the patch online, and for some reason Gerrit won't take my response. Anas correctly highlights that your initial patch should not advertise the support for the STM32F{ 2 | 3 | 4} MCUs, those should be added when that support comes in. I completely overlooked this, sorry about that.
|
|
Zephyr SDK v0.7.2 - "rm -rf /"
Mads Kristiansen <mkristian@...>
I downloaded the Zephyr SDK v0.7.2 last night and tried to install it this morning on my MacBook.
During the installation, I cancelled with ctrl-C and somehow it seems to have executed a "rm -rf /" (as root). Obviously my system wont boot now, so I cannot examine this further until I have it up and running again. Just a heads up and maybe someone should have a glance at the SDK to make sure noone else gets into the same situation. / Mads
|
|
Re: [users] Re: Re: Re: Re: Re: STM32F103x port
Nashif, Anas
On 14 Mar 2016, at 08:18, Maciek Borzecki <maciek.borzecki(a)gmail.com> wrote: We are looking into this and will send a proposal to address this by EOD. Anas
|
|
Re: [users] Re: Re: Re: Re: Re: STM32F103x port
Maciek Borzecki <maciek.borzecki@...>
On Fri, Mar 11, 2016 at 3:34 PM, Nashif, Anas <anas.nashif(a)intel.com> wrote:
Do we have a consensus on this matter then? Did you get a chance toOn 10 Mar 2016, at 13:28, Kalowsky, Daniel <daniel.kalowsky(a)intel.com> wrote:I am not in favour of adding the stm32 layer. I am all for adding the "SoC series" or "family layer”.-----Original Message-----You're confusing me now. Please state your objection to the proposed method clearly here. discuss this internally? Cheers, -- Maciek Borzecki
|
|
Re: FRDM-K64 GPIO driver name
Anders Dam Kofoed <adk@...>
Thanks Tomasz,
It compiles :) I will try lator today with a real GPIO test. Thanks again. /Anders
|
|
Re: FRDM-K64 GPIO driver name
Tomasz Bursztyka
Hi Anders,
toggle quoted messageShow quoted text
According to arch/arm/soc/fsl_frdm_k64f/Kconfig GPIO and GPIO_K64 are set by default. Verify you get these in your output/.config The name you should use is GPIO_K64_<X>_DEV_NAME (where X can be A, B, C, D or E) (so you should set #define GPIO_DRV_NAME CONFIG_K64_<X>_DEV_NAME in your code I guess) Tomasz
Hi,
|
|
FRDM-K64 GPIO driver name
Anders Dam Kofoed <adk@...>
Hi,
I am trying to use GPIO on my Freescale FRDM-K64 board. However, I cannot seem to find the driver name. It from this page that the driver name should be something like CONFIG_GPIO_<VENDOR_<MCU>_PORTn_DEV_NAME but nothing matches the FRDM-K64. https://www.zephyrproject.org/doc/reference/kconfig/index.html This is the code I'm trying to use (where GPIO_DRV_NAME should be what I need): gpio_dev = device_get_binding(GPIO_DRV_NAME); if (!gpio_dev) { PRINT("Cannot find %s!\n", GPIO_DRV_NAME); } Got it from the GPIO example. Any hints? /Anders
|
|
FRDM-K64 PRINT not working
Anders Dam Kofoed <adk@...>
Hi,
I have a Freescale FRDM-K64 board. I cannot get the samples/hello_world/microkernel to work. Compiling with this: # make O=out-arm BOARD=frdm_k64f It compiles fine and the out-arm/zephyr.bin can be dropped into the MBED folder (for easy programming) just fine. However I can see actually flashes the board (because the previous program is overwritten) but it's not showing "Hello World!" as I'd expect on the /dev/ttyACM0 (Linux). What am I doing wrong? Kind regards Anders
|
|
Re: 2/5 System Device Driver Modifications
Boie, Andrew P
Do you think we should replace SYS_INIT() with the new one? i.e. justThat was my first thought but I don't think we have the liberty of changing our 1.0 APIs. Andrew
|
|
Re: 2/5 System Device Driver Modifications
Thomas, Ramesh
On Fri, 2016-03-11 at 23:41 +0000, Boie, Andrew P wrote:
On Fri, 2016-03-11 at 22:30 +0000, Thomas, Ramesh wrote:Sounds good. We can use the SYS_INIT_NAMED() macro for devices thatI see. So at boot it could use device_get_binding() or DEVICE_GET() to need a name for PM purpose. Do you think we should replace SYS_INIT() with the new one? i.e. just modify SYS_INIT(). I am ok either way.
|
|
Re: RFC: Use error codes from errno.h
Andre Guedes <andre.guedes@...>
Hi all,
Quoting Andre Guedes (2016-03-03 16:43:24) Quoting Jesus Sanchez-Palencia (2016-03-02 16:03:22)Do we have a consensus about this?Yes, this is the idea.The initial discussion was about using errno.h codes at the driver's layer+1 ! But I would propose that we first get this right for the device driver APIs. After the "errno-drivers" patchset, DEV_* codes will be used only at 'board' and 'arch' layers. Actually, all occurrences of DEV_* codes in board/ are from pinmux drivers. These drivers are going to be landed in drivers/ soon (patches are under review on gerrit) so they will already be replaced by -E* codes. This means that only a few files from arch/ will be using DEV_* codes. If we have a consensus, the next steps are: 1) Replace DEV_* occurrences in arch/ (and boards/ if applicable); 2) Deprecate DEV_* (just add a comment in device.h saying: DEV_* are deprecate, use errno.h codes instead. 3) Remove DEV_* codes. Since 3) might break external applications, we should apply it during a major release I guess. Regards, Andre
|
|
Re: RFC: Use error codes from errno.h
Andre Guedes <andre.guedes@...>
Hi all,
Quoting Andre Guedes (2016-03-04 10:55:24) Hi,I just sent a patchset with topic "errno-drivers" implementing what we have discussed in this RFC. The patchset basically redefines DEV_* using -E* codes and replaces all occurrences of DEV_* by -E* at the driver layer. Regards, Andre
|
|
Re: [users] Re: Re: Re: Re: Re: STM32F103x port
Boie, Andrew P
On Fri, 2016-03-11 at 22:41 +0000, Maureen Helm wrote:
I think we will need this additional level to support more Kinetis family devices from Freescale/NXP. Many of these devices share common peripherals, differing by number of instances and base addresses for a given instance. Related to that, I also think SOC peripheral drivers should be located under arch/arm/soc. If you moved them here, I could see a structure like this:Something that also occurred to me: we have the same issue with our boards/ directory. As Zephyr gets put on more and more boards we're going to find ourselves with different variants of each board. I imagine new board revs, or that week they used a different peripheral part because of BOM cost, etc. So eventually I think we'll also have board configurations in-tree that are *almost* the same except for a few parameters...could share the same board.c, etc -- Andrew Boie Staff Engineer - EOS Zephyr Intel Open Source Technology Center
|
|
Re: 2/5 System Device Driver Modifications
Boie, Andrew P
On Fri, 2016-03-11 at 22:30 +0000, Thomas, Ramesh wrote:
I see. So at boot it could use device_get_binding() or DEVICE_GET() to populate some data structure with device pointers which is then used at suspend/resume time. Another reason of giving the PMA direct access to the device is toYou're already calling .suspend the first time so presumably you already have a device pointer, so I'm not sure how this imposes a requirement on naming. However the custom ordering for suspend/resume dependencies makes perfect sense, thanks for the additional detail. Looking at our headers I see some areas needing improvement. These anonymous drivers use SYS_INIT(). This macro declares a device with "" for its name, and the name you would use for DEVICE_GET() is very counter-intuitive. Which means you can't really use either device_get_binding() or DEVICE_GET() with them. I think this API needs to be refactored for system devices like this. Maybe have SYS_INIT() take a dev_name parameter. Here's a potential way with a new macro SYS_INIT_NAMED(), the difference is in the first couple args to DEVICE_INIT(): Old: #define SYS_INIT(init_fn, level, prio) \ DEVICE_INIT(sys_init_##init_fn, "", init_fn, NULL, NULL, level, prio) New: #define SYS_INIT_NAMED(name, init_fn, level, prio) \ DEVICE_INIT(name, STRINGIFY(name), init_fn, NULL, NULL, level, prio) -- Andrew Boie Staff Engineer - EOS Zephyr Intel Open Source Technology Center
|
|
Re: [users] Re: Re: Re: Re: Re: STM32F103x port
Maureen Helm
toggle quoted messageShow quoted text
-----Original Message-----I think we will need this additional level to support more Kinetis family devices from Freescale/NXP. Many of these devices share common peripherals, differing by number of instances and base addresses for a given instance. Related to that, I also think SOC peripheral drivers should be located under arch/arm/soc. If you moved them here, I could see a structure like this: arch/ arm/ soc/ kinetis/ drivers/ (peripheral drivers shared across multiple Kinetis SOCs) mk64f12/ (frdm-k64f12 is the name of the board, not the SOC. This will need to be fixed at some point.) mk22f12/ mkl27z644/ and many more... Where each of the mk* folders represents an SOC in the Kinetis family, and instantiates a subset of peripheral drivers that apply to that SOC. No, We make first make it fit in the current structure then take our time and doCorrect. That would be step #2.IThis the design as we have now (and it was proposed and discussed).
|
|
Re: 2/5 System Device Driver Modifications
Thomas, Ramesh
On Fri, 2016-03-11 at 21:03 +0000, Boie, Andrew P wrote:
On Fri, 2016-03-11 at 19:02 +0000, Kalowsky, Daniel wrote:The list enables the PMA to choose the order in which itIf you just need to iterate over all devices this code does the job:-----Original Message-----We agree that the device_get_binding is slow. We'd rather not depend upon it, suspends/resumes the devices by creating its own ordered list based on policies. If the iteration is done by the kernel then the order will be fixed to the order the devices are stored in the kernel's device list. For example, the PMA may chooses to apply .resume on -> APICs, Timers,If we go with that solution, pushing all policy decisions to the PMA,I'm still confused. Does the PMA need to only apply .suspend/.resume ARC, UART in that order because of dependencies and policies. Assuming it has a list of devices, it can identify these devices in that list by the name. The goal is to leave the ordering of operations on devices to the PMA as kernel can only guarantee the initialization order. Another reason of giving the PMA direct access to the device is to handle the case of DEV_BUSY/DEV_FAIL. It can then choose to retry .suspend only that device that returned DEV_BUSY. Also it can choose which devices it can ignore a failure and continue suspend.
|
|
Re: 2/5 System Device Driver Modifications
Boie, Andrew P
On Fri, 2016-03-11 at 19:02 +0000, Kalowsky, Daniel wrote:
If you just need to iterate over all devices this code does the job:-----Original Message-----We agree that the device_get_binding is slow. We'd rather not depend upon it, struct device *info; for (info = __device_init_start; info != __device_init_end; info++) { /* do stuff */ } Could add an API to nanokernel/device.c to take a function(struct device *d) as a parameter and apply to all of them so that the private __device_init_* symbols don't need to be public. If we go with that solution, pushing all policy decisions to the PMA,I'm still confused. Does the PMA need to only apply .suspend/.resume operations to a subset of all devices? Some examples/usecases would help... -- Andrew Boie Staff Engineer - EOS Zephyr Intel Open Source Technology Center
|
|
Re: RFC: 2/5 System Device Driver Modifications
Vinicius Costa Gomes
Hi,
"Thomas, Ramesh" <ramesh.thomas(a)intel.com> writes: On Fri, 2016-03-11 at 14:59 -0300, Vinicius Costa Gomes wrote:Ah, I see. Thanks.Hi,The power manager application should be able to handle that case. It Cheers, -- Vinicius
|
|
Re: RFC: 2/5 System Device Driver Modifications
Thomas, Ramesh
On Fri, 2016-03-11 at 14:59 -0300, Vinicius Costa Gomes wrote:
Hi,The power manager application should be able to handle that case. It can either retry after trying other drivers, ignore that driver or abort suspend. The callback is not going to help because _sys_soc_suspend is already called in the kernel idle task and it cannot go any more idle than that waiting for a callback to come. It is better off retrying the driver until it gets it to suspend.
|
|