In os\hal\lib\complex\serial_nor\devices\macronix_mx25\hal_flash_device.h line 201 there's a missing bracket (modified file attached).
Also, the size field has been removed from type flash_descriptor_t in hal_flash.h, but is still present and set up in the device-specific code for both mx25 and n25q. (Looks as if it can just be deleted - value doesn't appear to be used).
Looking at what's changed for SPI-type flash device drivers, the current naming scheme appears to preclude having support for several different devices in a single code file, and selecting one at run-time (so that multiple device manufacturers can be supported). This capability can be useful in case of supply shortages - devices from different manufacturers are often pin-compatible.
Flash - missing bracket Topic is solved
Flash - missing bracket Topic is solved
- Attachments
-
- hal_flash_device.zip
- (3.44 KiB) Downloaded 114 times
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Flash - missing bracket
Hi,
Thanks for the fix, I am merging.
About the size field, it is present in trunk, not present in 19.x. It has been added in latest version. Being a descriptor it is not used in code, outer layers may use it.
If you need devices selectable at runtime then you need to write a "device files" set with runtime checks on the chip IDs and all the required checks to handle command differences. Currently it is not supported but it should not require code changes in the common parts.
Giovanni
Thanks for the fix, I am merging.
About the size field, it is present in trunk, not present in 19.x. It has been added in latest version. Being a descriptor it is not used in code, outer layers may use it.
If you need devices selectable at runtime then you need to write a "device files" set with runtime checks on the chip IDs and all the required checks to handle command differences. Currently it is not supported but it should not require code changes in the common parts.
Giovanni
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Flash - missing bracket
Giovanni wrote:Hi,
If you need devices selectable at runtime then you need to write a "device files" set with runtime checks on the chip IDs and all the required checks to handle command differences. Currently it is not supported but it should not require code changes in the common parts.
Giovanni
But the device-specific files all have the same names, so there's likely to be compiler confusion if you try and include support for more than one device.
Or am I missing something here?
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Flash - missing bracket
You would include a single set of device files, one crafted to support multiple devices. Current device files are not designed for that.
Giovanni
Giovanni
Re: Flash - missing bracket
Giovanni wrote:You would include a single set of device files, one crafted to support multiple devices. Current device files are not designed for that.
Giovanni
I wondered if that was what you had in mind.
At one point you added a NULL field at the beginning of each flash descriptor with a view to supporting linked lists, and there were unique names for the interface routines of each type of flash. Could have made supporting multiple device types quite straightforward.
Who is online
Users browsing this forum: No registered users and 17 guests