-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Added file backend support to flash simulator for posix architecture #20553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added file backend support to flash simulator for posix architecture #20553
Conversation
All checks are passing now. Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages. |
Hi @vanwinkeljan, this is a great proposal. Do you think the addition of a lock for thread safety is required? |
@Laczen do you mean in native posix related code or the simulated flash driver in general? In the first case (native_posix specific code) no additional locking is needed as by design in native posix there is only one thread is active at the time. In the second case locking is need (and in place) as concurrent access could happen to the flash device. |
I mean for the simulated flash driver, I think it is missing. In the simulated eeprom I am only adding it when multithread is selected. BTW do you think it is needed to support multiple simulated flash/eeprom devices ? |
Looks like I mixed up both (flash/eeprom) drivers when looking at the code and the flash driver is missing any form of locking.
On the long run I would say yes, but we first we need a generic (generated) way of supporting multiple instance of a driver |
065cada
to
c631a4d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing serious found by my review, but CI did :)
Further the emulated device will not impose any write restriction that are | ||
applicable for a regular flash device, including changing the state of a bit | ||
from zero to one. | ||
on the host file system. The behaviour of the flash device can be configured |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
our project preference is for American English, so change to behavior
Extended flash simulator for posix architecture to read/write data from a binary file on the host file system. Further enable the flash simulator by default on native_posix(_64) boards and updated the documentation accordingly. Signed-off-by: Jan Van Winkel <[email protected]>
Removed native posix flash driver as functionality is merged with flash simulator driver. Signed-off-by: Jan Van Winkel <[email protected]>
c631a4d
to
d3f9095
Compare
@vanwinkeljan, no lock for multithreading yet? |
No, rather do that in a separate PR as this one is posix arch specific and no locking is needed in that case. |
Ok, I will approve. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pleas await for @kapi-no review
@nvlsianpu Note that we are in freeze, so this won't make it in anyhow for the next 2.5 weeks. |
@aescolar We are able to be extremely slow responsive :D |
@kapi-no any input? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of having a common flash simulator for all simulator platforms. Thank you for your effort and sorry for the late review.
Extended flash simulator for posix architecture to support writing/reading from a binary file.
Further removed the native_posix flash driver as its functionality is merged with the flash simulator driver.