Re: Device driver initialization sequence

2018-11-11 Thread Ярослав Лещинский
Hello Sebastian, Thank you a lot for your advice, I'll check. пн, 12 нояб. 2018 г., 9:56 Sebastian Huber sebastian.hu...@embedded-brains.de: > Hello, > > during development I would always enable the stack checker. You can > print out the stack usage in the fatal error handler. > > -- > Sebastian

Re: Device driver initialization sequence

2018-11-11 Thread Sebastian Huber
Hello, during development I would always enable the stack checker. You can print out the stack usage in the fatal error handler. -- 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 : se

Re: Device driver initialization sequence

2018-11-11 Thread Sebastian Huber
Hello, please make sure that you initialize the node control with IMFS_GENERIC_INITIALIZER() and that you do not set any handler to NULL. On 09/11/2018 16:02, Ярослав Лещинский wrote: [...] static const rtems_filesystem_file_handlers_r gpio_node_handlers = {     .open_h = rtems_filesystem_def

Re: Device driver initialization sequence

2018-11-11 Thread Ярослав Лещинский
Also: R0 = 0x2000125c R8 = 0x R1 = 0xf7d0 R9 = 0x R2 = 0x200033c8 R10 = 0x R3 = 0x20001084 R11 = 0x R4 = 0x024010e8 R12 = 0x8b00 R5 = 0x6301 SP = 0xff04 R6 = 0x0001 LR = 0x7791 R7 = 0x PC = 0x631e XPSR = 0x210

Re: Device driver initialization sequence

2018-11-09 Thread Ярослав Лещинский
I've tried the variant with posix descriptor and got an error when trying to call close(fd). Program crashed with RTEMS_FATAL_SOURCE_EXCEPTION. 107 rv = IMFS_make_generic_node( 108 "/dev/gpio", 109 S_IFCHR | S_IRWXU | S_IRWXG | S_IRWXO, 110 &gpio_node_contro

Re: Device driver initialization sequence

2018-11-09 Thread Ярослав Лещинский
Hello Sebastian, Thank you. This looks like what I needed. On Fri, 9 Nov 2018 at 13:32, Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > Hello Yaroslav, > > the initialization sequence is documented here: > > > https://docs.rtems.org/branches/master/c-user/initialization.html#initi

Re: Device driver initialization sequence

2018-11-09 Thread Sebastian Huber
Hello Yaroslav, the initialization sequence is documented here: https://docs.rtems.org/branches/master/c-user/initialization.html#initializing-rtems I would not use the I/O Manager. Working with major/minor numbers is quite painful. I would initialize custom devices in the initialization task

Device driver initialization sequence

2018-11-09 Thread Ярослав Лещинский
Hello, I read the documentation about I/O Manager, found different source codes where mentioning not only rtems_io_* functionality but also drvmgr*, rtems_libio* and another mechanisms which are referred to device driver topic and I have a feeling that I'm missing something. Could you please corr