Skip to content

Update Board for Feather M0 #1

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 2 commits into from
Feb 17, 2016
Merged

Conversation

obsoleted
Copy link

It would be nice to update the board to uniquely identify the Feather M0 as something different than the Zero.

This would help when making libraries that need to try to account for differences between the two boards.

What do ya'll think?

@ladyada
Copy link
Member

ladyada commented Feb 11, 2016

have thought about it but maybe best to have both defines? dont want to paint oneself into a corner :)

@obsoleted
Copy link
Author

I can see what you mean. Continuing to have ARDUINO_SAMD_ZERO defined probably does a fair bit for making libraries compatible that weren't otherwise aware of the board configuration. Having both would provide the same ability to have board specific behavior (unless they also started adding feather to theirs 😄 ).

- Instead of removing it in favor of ARDUINO_SAMD_FEATHER_M0 have both
  flags present to increase chances of compatibility with libraries.
@obsoleted
Copy link
Author

Any thoughts on this approach?

@ladyada
Copy link
Member

ladyada commented Feb 16, 2016

hiya, have you tested this with some feather projects to make sure it all still compiles?

@obsoleted
Copy link
Author

Only the test project I've been working on. But i'll go through some other examples to verify an get back to you.

@ladyada
Copy link
Member

ladyada commented Feb 16, 2016

awesome, just good to have some live testing - will merge once you feel its done! 👍

@obsoleted
Copy link
Author

I ran through some of the WINC1500 examples and did not see any issues. I specifically ran the SSL Client and FirmwareVersionCheck samples. If you prefer I can also update the PR to keep the board set to zero and have the extra flags contain the feather flag. I don't think it matters either way but there may be some corner of the build/ide system I'm not familiar with where it matters. Let me know, either way works the same for me.

For what its worth. I'm not sure things will ever be fully compatible with all the code out there. For example: https://github.com/ParsePlatform/Parse-SDK-Arduino/blob/01ca6a309ee28a16413f8b2f78168fdb3d8a6751/src/internal/ConnectionClient.h

That is an example of some code that wouldn't currently work now (as far as i can tell by code inspection, I haven't tried using the sdk). And to fix it one would have to know that for the feather both ARDUINO_SAMD_ZERO and ARDUINO_SAMD_FEATHER_M0 were defined when using the board config so that they either check for feather first or check for feather in a separate if statement as opposed to an elif block which wouldn't be reached. It is the same use case I'm working around right now: picking between Wifi101 and Adafruit_WINC1500 when building.
I didn't see much else that looked like it might not work so i'd hope that code like this is rare.

@ladyada
Copy link
Member

ladyada commented Feb 17, 2016

oki!

ladyada added a commit that referenced this pull request Feb 17, 2016
@ladyada ladyada merged commit 21b53d1 into adafruit:master Feb 17, 2016
@obsoleted
Copy link
Author

Thanks!

@obsoleted obsoleted deleted the board_featherm0 branch February 17, 2016 15:57
@obsoleted
Copy link
Author

Thanks for merging this in. Just curious, do you know when you might release an updated board config with these changes?

@ladyada
Copy link
Member

ladyada commented Feb 23, 2016

no ETA, looking at some bootloader stuff and may update both at once. if you have a specific deadline we can look to target that

ladyada added a commit that referenced this pull request Nov 26, 2016
PaintYourDragon pushed a commit that referenced this pull request May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants