-
Notifications
You must be signed in to change notification settings - Fork 11
Intercept machine.mem32 etc. #78
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
Conversation
✅ Deploy Preview for distracted-dubinsky-fd8a42 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
395eaf6 to
841b12c
Compare
Provide a minimal implementation that allows reading the device ID but otherwise raises an exception.
841b12c to
c042b3c
Compare
|
@microbit-carlos this PR fails all writes and all reads other than the device ID (which we push folks towards in our support article, for better or worse). Queries:
|
|
Still interested in the responses to the above but I think I'm happy to merge this once Rob has had a chance to review. It's certainly an improvement on the current behaviour. |
microbit-robert
left a comment
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.
LGTM. Referenced code in support article runs as expected.
Can't think of others are likely to be used, but there a few that are simple to replicate in the sim, mostly page size (4K), flash and RAM size, and the nordic part type (52833). But yeah, not worth implementing it unless we have a real use case (I've only used them for development and testing) or users request it.
My first instinct was to return a "known incorrect" value, so that the sim wouldn't throw an exception that the device wouldn't throw, but to be fair if they are doing anything with the value, they'd have to either do an extra check for the sim value, or wrap it in a try/except for the sim as well, so as both cases need sim-specific code, I think it's fine as it is 👍 |
Provide a minimal implementation that allows reading the device ID but otherwise raises an exception.
I'm open to adding other FICR but this is the priority to get the code on this support article working in the simulator.
Closes #58