Skip to content
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

Remove -Wno-expansion-to-defined #557

Open
wants to merge 2 commits into
base: master
from

Conversation

@matthijskooijman
Copy link
Collaborator

@matthijskooijman matthijskooijman commented Aug 27, 2020

By including a different CMSIS header, this warning no longer needs to be supressed.

This fixes #556.

The sam.h file uses some non-portable macros that raise a warning in
newer gcc version. This warning was supressed in commit 8575a52 (Add
-Wno-expansion-to-defined compile warning flag), but this is not ideal.

However, since the only thing sam.h does is figure out what CPU is
selected and include the right family header, and we always use SAMD21
CPUs, the only thing sam.h does is include samd.h.

So we can easily bypass then and include samd.h directly.

This fixes the first part of #556.
Now that we no longer include sam.h, this warning is no longer triggered
in normal builds, so there is no longer a need to supress it.

This fixes #556.
@ArduinoBot
Copy link

@ArduinoBot ArduinoBot commented Aug 27, 2020

Build completed.

⬇️ Build URL: http://downloads.arduino.cc/PR/samd/package_samd-b209_index.json

ℹ️ To test this build:

  1. Open the Preferences of the Arduino IDE.
  2. Add the Build URL above in the Additional Boards Manager URLs field, and click OK.
  3. Open the Boards Manager (menu Tools->Board->Board Manager...)
  4. Install Arduino SAMD core - Pull Request #557
  5. Select one of the boards under SAMD Pull Request #557 in Tools->Board menu
  6. Compile/Upload as usual
@facchinm
Copy link
Member

@facchinm facchinm commented Aug 27, 2020

LGTM! @cmaglie are you ok in merging it?

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

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.