Fix for "only initialized variables can be placed into program memory area" warning #1793
Labels
Component: Core
Related to the code for the standard Arduino API
Component: Toolchain
The tools used for compilation and uploading to Arduino boards
Milestone
As discussed on the developer mailing list: https://groups.google.com/a/arduino.cc/forum/#!msg/developers/5iaId6nPzqA/jpgd38UdBqQJ.
Here is how I got rid of the incorrect "only initialized variables can be placed into program memory area" warning: https://github.com/felis/USB_Host_Shield_2.0/blob/f676812f84b3212779365b9950927a01209e4045/settings.h#L82-L96. This was done for the USB Host library, but could easily be used in the Arduino core as well.
See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34734.
The fixed is based on the following comment: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34734#c4.
I have tested it myself on my local copy of the Arduino IDE and it works fine. I can send a pull request for that if you like?
The text was updated successfully, but these errors were encountered: