Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. WS2812FX, MySensors and "Expansion of macro F"

WS2812FX, MySensors and "Expansion of macro F"

Scheduled Pinned Locked Moved Troubleshooting
4 Posts 2 Posters 1.5k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SushukkaS Offline
    SushukkaS Offline
    Sushukka
    wrote on last edited by
    #1

    Hello,
    I try to compile a sketch with ESP8266 MySensors Gateway and WS2812FX library. I can use WS2812FX separately and compile all the example sketches there are, but now when trying to combine these two worlds together I get a following error:

    Build options changed, rebuilding all
    In file included from C:\Omat\Own_projects\Arduino\omat\libraries\MySensors/MySensors.h:28:0,
    
                     from C:\Omat\Own_projects\Arduino\omat\MySensors\HomeNumber_IrRemote\HomeNumber_IrRemote.ino:39:
    
    C:\Users\userxxx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/pgmspace.h:21:51: error: __c causes a section type conflict with __c
    
     #define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];}))
    
                                                       ^
    
    C:\Omat\Own_projects\Arduino\omat\libraries\MySensors/core/MySensorsCore.h:91:40: note: in definition of macro 'CORE_DEBUG'
    
     #define CORE_DEBUG(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
    
                                            ^
    
    C:\Omat\Own_projects\Arduino\omat\libraries\MySensors/core/MySensorsCore.cpp:594:13: note: in expansion of macro 'PSTR'
    
      CORE_DEBUG(PSTR("MCO:SLP:WUP=%d\n"), result); // sleep wake-up
    
                 ^
    
    In file included from C:\Users\userxxx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/Arduino.h:243:0,
    
                     from sketch\HomeNumber_IrRemote.ino.cpp:1:
    
    C:\Users\userxxx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/pgmspace.h:21:51: note: '__c' was declared here
    
     #define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];}))
    
                                                       ^
    
    C:\Users\userxxx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:38:76: note: in definition of macro 'FPSTR'
    
     #define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
    
                                                                                ^
    
    C:\Users\userxxx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:39:34: note: in expansion of macro 'PSTR'
    
     #define F(string_literal) (FPSTR(PSTR(string_literal)))
    
                                      ^
    
    C:\Omat\Own_projects\Arduino\libraries\WS2812FX-master/WS2812FX.h:284:50: note: in expansion of macro 'F'
    
           _name[FX_MODE_CUSTOM]                    = F("Custom");
    
                                                      ^
    
    exit status 1
    Error compiling for board WeMos D1 R2 & mini.
    

    Not sure what this actually means, but I assume either MySensors or WS2812FX "overlaps" somehow.

    SushukkaS 1 Reply Last reply
    0
    • SushukkaS Sushukka

      Hello,
      I try to compile a sketch with ESP8266 MySensors Gateway and WS2812FX library. I can use WS2812FX separately and compile all the example sketches there are, but now when trying to combine these two worlds together I get a following error:

      Build options changed, rebuilding all
      In file included from C:\Omat\Own_projects\Arduino\omat\libraries\MySensors/MySensors.h:28:0,
      
                       from C:\Omat\Own_projects\Arduino\omat\MySensors\HomeNumber_IrRemote\HomeNumber_IrRemote.ino:39:
      
      C:\Users\userxxx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/pgmspace.h:21:51: error: __c causes a section type conflict with __c
      
       #define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];}))
      
                                                         ^
      
      C:\Omat\Own_projects\Arduino\omat\libraries\MySensors/core/MySensorsCore.h:91:40: note: in definition of macro 'CORE_DEBUG'
      
       #define CORE_DEBUG(x,...) hwDebugPrint(x, ##__VA_ARGS__) //!< debug
      
                                              ^
      
      C:\Omat\Own_projects\Arduino\omat\libraries\MySensors/core/MySensorsCore.cpp:594:13: note: in expansion of macro 'PSTR'
      
        CORE_DEBUG(PSTR("MCO:SLP:WUP=%d\n"), result); // sleep wake-up
      
                   ^
      
      In file included from C:\Users\userxxx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/Arduino.h:243:0,
      
                       from sketch\HomeNumber_IrRemote.ino.cpp:1:
      
      C:\Users\userxxx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/pgmspace.h:21:51: note: '__c' was declared here
      
       #define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];}))
      
                                                         ^
      
      C:\Users\userxxx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:38:76: note: in definition of macro 'FPSTR'
      
       #define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
      
                                                                                  ^
      
      C:\Users\userxxx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:39:34: note: in expansion of macro 'PSTR'
      
       #define F(string_literal) (FPSTR(PSTR(string_literal)))
      
                                        ^
      
      C:\Omat\Own_projects\Arduino\libraries\WS2812FX-master/WS2812FX.h:284:50: note: in expansion of macro 'F'
      
             _name[FX_MODE_CUSTOM]                    = F("Custom");
      
                                                        ^
      
      exit status 1
      Error compiling for board WeMos D1 R2 & mini.
      

      Not sure what this actually means, but I assume either MySensors or WS2812FX "overlaps" somehow.

      SushukkaS Offline
      SushukkaS Offline
      Sushukka
      wrote on last edited by Sushukka
      #2

      @sushukka Here is discussion about this topic with WS2812FX author. Workaround found, maybe changes in the future. Nevertheless, this led library is really worth to try as it saves lots of time by having plenty of ready built animations for WS2812 addressable led strips + the library is very easy to use.

      mfalkviddM 1 Reply Last reply
      0
      • SushukkaS Sushukka

        @sushukka Here is discussion about this topic with WS2812FX author. Workaround found, maybe changes in the future. Nevertheless, this led library is really worth to try as it saves lots of time by having plenty of ready built animations for WS2812 addressable led strips + the library is very easy to use.

        mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by
        #3

        @sushukka WS2812FX looks really neat indeed, thanks for posting about it.

        Did you intend to include a link in your latest post? If so, it seems it got lost.

        SushukkaS 1 Reply Last reply
        0
        • mfalkviddM mfalkvidd

          @sushukka WS2812FX looks really neat indeed, thanks for posting about it.

          Did you intend to include a link in your latest post? If so, it seems it got lost.

          SushukkaS Offline
          SushukkaS Offline
          Sushukka
          wrote on last edited by
          #4

          @mfalkvidd Thanks mfalkvidd...the oldest mistake one can make and I'm still falling to it regularly. Here are the links:
          Link to the library: https://github.com/kitesurfer1404/WS2812FX/issues/83
          Link to the problem workaround: https://github.com/kitesurfer1404/WS2812FX

          1 Reply Last reply
          1
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          23

          Online

          11.7k

          Users

          11.2k

          Topics

          113.1k

          Posts


          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • MySensors
          • OpenHardware.io
          • Categories
          • Recent
          • Tags
          • Popular