GSoC Linux UIO driver for PRU

Joel Sherrill joel at rtems.org
Tue Jul 16 11:47:17 UTC 2019


On Tue, Jul 16, 2019, 6:34 AM Nils Hölscher <nilhoel1 at gmail.com> wrote:

> Hi,
>
> I am currently porting the pruss driver functions, that I want to add in:
> rtems_filesystem_file_handlers_r pruss_irq_handler.
> But when I add  my functions like this:
>   .open_h = ti_pruss_irq_open
> I receive the following compiler warnings:
> ../../pruss.c:156:13: warning: initialization from incompatible pointer
> type [-Wincompatible-pointer-types]
>    .open_h = ti_pruss_irq_open,
>              ^~~~~~~~~~~~~~~~~
> ../../pruss.c:156:13: note: (near initialization for
> 'pruss_irq_handler.open_h')
> ../../pruss.c:158:13: warning: initialization from incompatible pointer
> type [-Wincompatible-pointer-types]
>    .read_h = ti_pruss_irq_read,
>
> Can anyone help please?
>

This usually means that either the prototype of the method has not been
seen before it is used or the method signature does not match that expected
of the indirect method pointer on the left hand side. Make sure the
signature matches.

> The full source can be found here:
> https://github.com/nilhoel1/rtems-pru/blob/pruss-shell/pruss.c#L91
> https://github.com/nilhoel1/rtems-pru/blob/pruss-shell/pruss.c#L155
>
> Best,
> Nils
>
> On Mon, 15 Jul 2019 at 10:15, Sebastian Huber <
> sebastian.huber at embedded-brains.de> wrote:
>
>> On 15/07/2019 10:10, Nils Hölscher wrote:
>> > Thanks this is very helpful.
>> > But has anyone an existing example of a similar driver?
>> > I wasn't able find one in /bsps, maybe I didn't search long enough.
>>
>> There are some in cpukit:
>>
>> cpukit/libcsupport/src/consolesimple.c:  IMFS_make_generic_node(
>> cpukit/libcsupport/src/termios.c:  rv = IMFS_make_generic_node(
>> cpukit/libcsupport/src/consolesimpletask.c:  IMFS_make_generic_node(
>> cpukit/include/rtems/imfs.h: *   rv = IMFS_make_generic_node(
>> cpukit/include/rtems/imfs.h:extern int IMFS_make_generic_node(
>> cpukit/libfs/src/imfs/imfs_make_generic_node.c:int IMFS_make_generic_node(
>> cpukit/dev/i2c/i2c-bus.c:  rv = IMFS_make_generic_node(
>> cpukit/dev/i2c/i2c-dev.c:  rv = IMFS_make_generic_node(
>> cpukit/dev/spi/spi-bus.c:  rv = IMFS_make_generic_node(
>> cpukit/libblock/src/blkdev-imfs.c:      int rv = IMFS_make_generic_node(
>> cpukit/libblock/src/blkdev-imfs.c:            rv = IMFS_make_generic_node(
>>
>> --
>> Sebastian Huber, embedded brains GmbH
>>
>> Address : Dornierstr. 4, D-82178 Puchheim, Germany
>> Phone   : +49 89 189 47 41-16
>> Fax     : +49 89 189 47 41-09
>> E-Mail  : sebastian.huber at embedded-brains.de
>> PGP     : Public key available on request.
>>
>> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190716/b2176b04/attachment-0002.html>


More information about the devel mailing list