-
Notifications
You must be signed in to change notification settings - Fork 8
Port in PSTR macro changes from arduino core #3
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
Comments
As the http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4340 EDIT: Although the keyword still appears in the C standards I suspect it doesn't really do anything any more. But I could be wrong! https://stackoverflow.com/questions/37456494/why-was-the-register-keyword-created |
No, I think you're right. Or, at least, C++17 makes it a Although I'm not exactly sure what I'll also make asm->asm or whatever is the "right" way to make that happen, as you commented in the Sming repo IIRC. |
https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html
|
It's used extensively within Arduino, but there are two instances within
|
I've just attempted a Linux compile with optimisations disabled, and got this:
It's objecting to the A15 clobber, if I remove that it's fine. (Note: I only ran this test at |
Got it on the format changes, thanks. I guess since I didn't include the right pgmspace.h they didn't pop up for me. :) For |
Fixes #3 Change from a15 to a14 in the pgm_read_dword_unaligned macro to allow -O0 builds to complete. Change the local __c to __pstr__ to make it easier/safer to match in link stage in the case when it is not automatically included in PROGMEM (i.e. in templates where section attrs get tossed).
@earlephilhower Did you forget to change |
I did try the code with gcc9.2 and std=c++17 and -O0 in arduino with no errors. Are you sure about having an issue with asm(xxxx) as opposed to the 1-line asm ? |
This is the error I get:
|
Can you give a small .C file I can compile locally, and any GCC flags? I'm not seeing that (and it seems to be building in the Arduino CI OK, too)... |
Compile with |
If you build with |
Forgot to say, use |
This is interesting: https://stackoverflow.com/questions/13870489/is-inline-asm-part-of-the-ansi-c-standard. I don't have a problem working around this issue if it causes you problems. It only crops up compiling SPIFFS - we use the original source but I note arduino has pulled it in and converted to .cpp which is why this issue never comes up. |
I don't mind adding underscores, but I really can't repro this on my own setup even with the example you gave. I'm running from inside the esp-quick-toolchain dir and here's what I get. I think there's something else going on is my worry:
|
To be clear, this is the latest -gnu4 build (with all the PRs included). I just got home and will do the upload now. |
Ignore the
|
Ah, got it. |
Newlib is fixed and I'm rebuilding the whole kaboodle. Another hour or so and -gnu4 should be up. |
esp8266/Arduino#6565
The text was updated successfully, but these errors were encountered: