Skip to content

Puyafix #6619

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

Merged
merged 3 commits into from
Oct 7, 2019
Merged

Puyafix #6619

merged 3 commits into from
Oct 7, 2019

Conversation

d-a-v
Copy link
Collaborator

@d-a-v d-a-v commented Oct 7, 2019

PUYA_SUPPORT was not correctly enabled by default.

It was originally defined to 0 by default in Esp.h and later to 1 in Arduino.h (!).
Its definition is now only in Esp.cpp.

@TD-er should the definition of PUYA_SUPPORT be visible if it is not user-defined ?

@devyte devyte merged commit fabd169 into esp8266:master Oct 7, 2019
@devyte devyte added this to the 2.6.0 milestone Oct 7, 2019
@TD-er
Copy link
Contributor

TD-er commented Oct 8, 2019

I do use it to create a descriptive string for the core libraries and give some warning if support is not enabled and a puya device is found.
So it would be a nice to have if it is "publicly" visible.
But you already have it wrapped in #ifndef statements, so I can define it in the platformio.ini file and thus still have it publicly available.
Only thing is, if someone has made a build of its own it may not show the errors.

Maybe you could add a public function for "non supported flash found" ?

@d-a-v
Copy link
Collaborator Author

d-a-v commented Oct 8, 2019

Maybe you could add a public function for "non supported flash found" ?

Could you please elaborate ?

@TD-er
Copy link
Contributor

TD-er commented Oct 8, 2019

Well, in the CPP file you now have the define for PUYA support.
So that's not "public", which is fine.
But to be able to check whether or not PUYA support is enabled, it could check for the existence of a puya chip and whether it has PUYA support enabled.
Maybe later there will be other patches for other non standard flash chips, so I thought it would be a bad idea to have this check function named after "puya", so maybe a more generic function name to check whether we may expect issues with the current firmware.

bool nonSupportedFlashChipFound();
Or something like that.

@d-a-v
Copy link
Collaborator Author

d-a-v commented Oct 8, 2019

It would be interesting to have a flash config/state bitfield-like API.
With #6559 we would be able to know whether the chip is

  • unsupported (like puya, reporting when fix is not enabled)
  • underclocked (can run faster, like XMC, reporting when not enabled)

@TD-er
Copy link
Contributor

TD-er commented Oct 9, 2019

That would be great indeed.
Such information can really help in narrowing down the cause of reported issues.
What is left then is to do the correct interpretation of those bits :) (e.g., is underclocked more stable? I would expect it to be)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants