-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cpu/samd21: set optimization level to -Os #2848
cpu/samd21: set optimization level to -Os #2848
Conversation
Nice one! ACK, waiting for Travis.. |
Have you tested with some applications to check if this has no unexpected side effect? |
We did, it has some problems with the GPIO implementation AFAIR. |
Tested with some easy applications but not with peripheral tests. In this case I revert my ACK and need to do some further testings :( |
I did some more tests, the GPIO drivers are not cleanly implemented. I was not really going to look into this in detail... But I will try to do so. Just a remark: the GPIO issues are actually unrelated to this PR, it just seems that enabling the compiler optimization triggers the compiler to detect them... |
Well, while I think it's okay for this particular test application, that was exactly the idea behind my question: even if the underlying problem is unrelated to this change, it may introduce failures that won't happen without the optimization. rpl_udp is typically a good candidate, but I have only one SAMR21 here. |
I will look into this once I find some time... |
I think we can either (i) merge this PR and open an issue, close this and open an issue (iii) close this PR as it is also part of #2852 and move the discussion there |
Just saw that the GPIO warnings are not the only issue for the |
@haukepetersen, might be the cause of the GPIO as well? or SPI? |
I had no time to look further into this, yet. But I hope to get to it in the end of the week. |
fb42b72
to
32410bb
Compare
Good news: the samr21 is now doing fine with |
@@ -6,7 +6,4 @@ export CFLAGS += -DDONT_USE_CMSIS_INIT | |||
# use the hwtimer compatibility layer | |||
USEMODULE += hwtimer_compat | |||
|
|||
# TODO: remove once the CPU implementation is stable with -Os | |||
CFLAGS_OPT = -O0 | |||
|
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.
Shouldn't we change it by -Os then?
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.
No, the common makefile defines CFLAGS_OPT ?= -Os
.
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.
ok
somebody up to acking this? |
Just connected the samr21, sec |
works. ACK&go. |
cpu/samd21: remove -O0 override
awesome, thx. |
seems we are moving in the right direction with this board :-) |
yeah ;) |
I was wondering about the huge code-size for the samr21-xpro - turned out, the optimization for the board is turned off... Looks better now.