SPI flash support using flashdisk.c or spi-memdrv.c
Philip Molloy
philip at philipmolloy.com
Fri Nov 20 14:22:24 UTC 2020
spi-memdrv.c does not implement open() or close(), which means `null_handler_open()` is called, but `errno` is never set:
``` open.c:
if ( iop != NULL ) {
rv = do_open( iop, path, oflag, mode );
} else {
errno = ENFILE;
rv = -1;
}
va_end( ap );
return rv;
```
Is the expectation that I should update `spi_flash_m25p40_ro_driver_descriptor` with handlers for open and close before passing it to `rtems_libi2c_register_drv()`? Am I not initializing some part of a framework that should add those handlers?
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, November 11, 2020 8:09 AM, Philip Molloy <philip at philipmolloy.com> wrote:
> Hello,
>
> I'd like to store a bootable image as well as persistent configuration data on a Cypress S25FS128S SPI flash. A similar question on this mailing list in 2010 prompted two people to suggest using flashdisk.c. However spi-memdrv.c appears to be more generic. I'd appreciate any recommendations of what to use. Also any suggestions for additional features or fixes. I would be happy to contribute what I implement upstream.
>
> Best,
> Philip
>
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
More information about the users
mailing list