[SOLVED] MySensors library on Linux Mint Arduino IDE not working



  • Hi everyone!

    I'm having trouble installing the MySensors library on Linux Mint 18.3 Cinnamon. Tried it dozens of times. Changing names and while root as well. Here's the printout:

    In file included from pir_led_v9.ino:8:0:
    /root/sketchbook/libraries/MySensors/MySensors.h:83:2: error: #error Hardware abstraction not defined (unsupported platform)
     #error Hardware abstraction not defined (unsupported platform)
      ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:364:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/hal/transport/RF24/driver/RF24.cpp: In function ‘void RF24_csn(bool)’:
    /root/sketchbook/libraries/MySensors/hal/transport/RF24/driver/RF24.cpp:50:38: error: ‘hwDigitalWrite’ was not declared in this scope
      hwDigitalWrite(MY_RF24_CS_PIN, level);
                                          ^
    /root/sketchbook/libraries/MySensors/hal/transport/RF24/driver/RF24.cpp: In function ‘void RF24_ce(bool)’:
    /root/sketchbook/libraries/MySensors/hal/transport/RF24/driver/RF24.cpp:56:38: error: ‘hwDigitalWrite’ was not declared in this scope
      hwDigitalWrite(MY_RF24_CE_PIN, level);
                                          ^
    /root/sketchbook/libraries/MySensors/hal/transport/RF24/driver/RF24.cpp: In function ‘bool RF24_initialize()’:
    /root/sketchbook/libraries/MySensors/hal/transport/RF24/driver/RF24.cpp:515:34: error: ‘hwPinMode’ was not declared in this scope
      hwPinMode(MY_RF24_CE_PIN, OUTPUT);
                                      ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:408:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘void stInitTransition()’:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:94:45: error: ‘hwReadConfigBlock’ was not declared in this scope
                        sizeof(transportConfig_t));
                                                 ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘void stInitUpdate()’:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:124:45: error: expected ‘)’ before ‘PRIu8’
        TRANSPORT_DEBUG(PSTR("TSM:INIT:STATID=%" PRIu8 "\n"),(uint8_t)MY_NODE_ID);
                                                 ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:124:4: note: in expansion of macro ‘TRANSPORT_DEBUG’
        TRANSPORT_DEBUG(PSTR("TSM:INIT:STATID=%" PRIu8 "\n"),(uint8_t)MY_NODE_ID);
        ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:408:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:128:61: error: ‘hwWriteConfig’ was not declared in this scope
        hwWriteConfig(EEPROM_NODE_ID_ADDRESS, (uint8_t)MY_NODE_ID);
                                                                 ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘void stIDTransition()’:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:209:40: error: ‘hwMillis’ was not declared in this scope
       _transportToken = (uint8_t)(hwMillis() & 0xFF);
                                            ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘void stUplinkUpdate()’:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:261:43: error: ‘hwMillis’ was not declared in this scope
       _transportSM.lastUplinkCheck = hwMillis();
                                               ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:265:44: error: expected ‘)’ before ‘PRIu8’
        TRANSPORT_DEBUG(PSTR("TSM:UPL:DGWC,O=%" PRIu8 ",N=%" PRIu8 "\n"), _transportConfig.distanceGW,
                                                ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:265:4: note: in expansion of macro ‘TRANSPORT_DEBUG’
        TRANSPORT_DEBUG(PSTR("TSM:UPL:DGWC,O=%" PRIu8 ",N=%" PRIu8 "\n"), _transportConfig.distanceGW,
        ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘void stReadyTransition()’:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:292:40: error: expected ‘)’ before ‘PRIu8’
      TRANSPORT_DEBUG(PSTR("TSM:READY:ID=%" PRIu8 ",PAR=%" PRIu8 ",DIS=%" PRIu8 "\n"),
                                            ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:292:2: note: in expansion of macro ‘TRANSPORT_DEBUG’
      TRANSPORT_DEBUG(PSTR("TSM:READY:ID=%" PRIu8 ",PAR=%" PRIu8 ",DIS=%" PRIu8 "\n"),
      ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘void stFailureTransition()’:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:343:40: error: expected ‘)’ before ‘PRIu8’
      TRANSPORT_DEBUG(PSTR("TSM:FAIL:CNT=%" PRIu8 "\n"),_transportSM.failureCounter);
                                            ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:343:2: note: in expansion of macro ‘TRANSPORT_DEBUG’
      TRANSPORT_DEBUG(PSTR("TSM:FAIL:CNT=%" PRIu8 "\n"),_transportSM.failureCounter);
      ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:408:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘void transportSwitchSM(transportState_t&)’:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:374:37: error: ‘hwMillis’ was not declared in this scope
      _transportSM.stateEnter = hwMillis(); // save time
                                         ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘uint32_t transportTimeInState()’:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:379:18: error: ‘hwMillis’ was not declared in this scope
      return hwMillis() - _transportSM.stateEnter;
                      ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘bool transportWaitUntilReady(uint32_t)’:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:449:38: error: expected ‘)’ before ‘PRIu32’
      TRANSPORT_DEBUG(PSTR("TSF:WUR:MS=%" PRIu32 "\n"), waitingMS); // timeout
                                          ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:449:2: note: in expansion of macro ‘TRANSPORT_DEBUG’
      TRANSPORT_DEBUG(PSTR("TSF:WUR:MS=%" PRIu32 "\n"), waitingMS); // timeout
      ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:408:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:450:30: error: ‘hwMillis’ was not declared in this scope
      uint32_t enterMS = hwMillis();
                                  ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘bool transportCheckUplink(bool)’:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:471:26: error: ‘hwMillis’ was not declared in this scope
      if (!force && (hwMillis() - _transportSM.lastUplinkCheck) < MY_TRANSPORT_CHKUPL_INTERVAL_MS) {
                              ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:480:43: error: ‘hwMillis’ was not declared in this scope
       _transportSM.lastUplinkCheck = hwMillis();
                                               ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:484:44: error: expected ‘)’ before ‘PRIu8’
        TRANSPORT_DEBUG(PSTR("TSF:CKU:DGWC,O=%" PRIu8 ",N=%" PRIu8 "\n"), _transportConfig.distanceGW,
                                                ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:484:4: note: in expansion of macro ‘TRANSPORT_DEBUG’
        TRANSPORT_DEBUG(PSTR("TSF:CKU:DGWC,O=%" PRIu8 ",N=%" PRIu8 "\n"), _transportConfig.distanceGW,
        ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:408:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘bool transportAssignNodeID(uint8_t)’:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:502:50: error: ‘hwWriteConfig’ was not declared in this scope
       hwWriteConfig(EEPROM_NODE_ID_ADDRESS, newNodeId);
                                                      ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:503:42: error: expected ‘)’ before ‘PRIu8’
       TRANSPORT_DEBUG(PSTR("TSF:SID:OK,ID=%" PRIu8 "\n"),newNodeId); // Node ID assigned
                                              ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:503:3: note: in expansion of macro ‘TRANSPORT_DEBUG’
       TRANSPORT_DEBUG(PSTR("TSF:SID:OK,ID=%" PRIu8 "\n"),newNodeId); // Node ID assigned
       ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:506:45: error: expected ‘)’ before ‘PRIu8’
       TRANSPORT_DEBUG(PSTR("!TSF:SID:FAIL,ID=%" PRIu8 "\n"),newNodeId); // ID is invalid, cannot assign ID
                                                 ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:506:3: note: in expansion of macro ‘TRANSPORT_DEBUG’
       TRANSPORT_DEBUG(PSTR("!TSF:SID:FAIL,ID=%" PRIu8 "\n"),newNodeId); // ID is invalid, cannot assign ID
       ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:408:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘bool transportWait(uint32_t, uint8_t, uint8_t)’:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:603:36: error: ‘hwMillis’ was not declared in this scope
      const uint32_t enterMS = hwMillis();
                                        ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘uint8_t transportPingNode(uint8_t)’:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:619:44: error: expected ‘)’ before ‘PRIu8’
       TRANSPORT_DEBUG(PSTR("TSF:PNG:SEND,TO=%" PRIu8 "\n"), targetId);
                                                ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:619:3: note: in expansion of macro ‘TRANSPORT_DEBUG’
       TRANSPORT_DEBUG(PSTR("TSF:PNG:SEND,TO=%" PRIu8 "\n"), targetId);
       ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘void transportProcessMessage()’:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:667:40: error: expected ‘)’ before ‘PRIu8’
      TRANSPORT_DEBUG(PSTR("TSF:MSG:READ,%" PRIu8 "-%" PRIu8 "-%" PRIu8 ",s=%" PRIu8 ",c=%" PRIu8 ",t=%"
                                            ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:667:2: note: in expansion of macro ‘TRANSPORT_DEBUG’
      TRANSPORT_DEBUG(PSTR("TSF:MSG:READ,%" PRIu8 "-%" PRIu8 "-%" PRIu8 ",s=%" PRIu8 ",c=%" PRIu8 ",t=%"
      ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:676:41: error: expected ‘)’ before ‘PRIu8’
       TRANSPORT_DEBUG(PSTR("!TSF:MSG:LEN=%" PRIu8 ",EXP=%" PRIu8 "\n"), payloadLength,
                                             ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:676:3: note: in expansion of macro ‘TRANSPORT_DEBUG’
       TRANSPORT_DEBUG(PSTR("!TSF:MSG:LEN=%" PRIu8 ",EXP=%" PRIu8 "\n"), payloadLength,
       ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:684:42: error: expected ‘)’ before ‘PRIu8’
       TRANSPORT_DEBUG(PSTR("!TSF:MSG:PVER,%" PRIu8 "!=%" PRIu8 "\n"), mGetVersion(_msg),
                                              ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:684:3: note: in expansion of macro ‘TRANSPORT_DEBUG’
       TRANSPORT_DEBUG(PSTR("!TSF:MSG:PVER,%" PRIu8 "!=%" PRIu8 "\n"), mGetVersion(_msg),
       ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:769:53: error: expected ‘)’ before ‘PRIu8’
             TRANSPORT_DEBUG(PSTR("TSF:MSG:FPAR OK,ID=%" PRIu8 ",D=%" PRIu8 "\n"), _transportConfig.parentNodeId,
                                                         ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:769:9: note: in expansion of macro ‘TRANSPORT_DEBUG’
             TRANSPORT_DEBUG(PSTR("TSF:MSG:FPAR OK,ID=%" PRIu8 ",D=%" PRIu8 "\n"), _transportConfig.parentNodeId,
             ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:782:49: error: expected ‘)’ before ‘PRIu8’
          TRANSPORT_DEBUG(PSTR("TSF:MSG:PINGED,ID=%" PRIu8 ",HP=%" PRIu8 "\n"), sender,
                                                     ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:782:6: note: in expansion of macro ‘TRANSPORT_DEBUG’
          TRANSPORT_DEBUG(PSTR("TSF:MSG:PINGED,ID=%" PRIu8 ",HP=%" PRIu8 "\n"), sender,
          ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:796:53: error: expected ‘)’ before ‘PRIu8’
           TRANSPORT_DEBUG(PSTR("TSF:MSG:PONG RECV,HP=%" PRIu8 "\n"),
                                                         ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:796:7: note: in expansion of macro ‘TRANSPORT_DEBUG’
           TRANSPORT_DEBUG(PSTR("TSF:MSG:PONG RECV,HP=%" PRIu8 "\n"),
           ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:408:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:886:21: error: ‘hwMillis’ was not declared in this scope
          delay(hwMillis() & 0x3ff);
                         ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘bool transportSendWrite(uint8_t, MyMessage&)’:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:1007:42: error: expected ‘)’ before ‘PRIu8’
      TRANSPORT_DEBUG(PSTR("%sTSF:MSG:SEND,%" PRIu8 "-%" PRIu8 "-%" PRIu8 "-%" PRIu8 ",s=%" PRIu8 ",c=%"
                                              ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:1007:2: note: in expansion of macro ‘TRANSPORT_DEBUG’
      TRANSPORT_DEBUG(PSTR("%sTSF:MSG:SEND,%" PRIu8 "-%" PRIu8 "-%" PRIu8 "-%" PRIu8 ",s=%" PRIu8 ",c=%"
      ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:408:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘void transportSetRoute(uint8_t, uint8_t)’:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:1071:51: error: ‘hwWriteConfig’ was not declared in this scope
      hwWriteConfig(EEPROM_ROUTES_ADDRESS + node, route);
                                                       ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘uint8_t transportGetRoute(uint8_t)’:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:1081:52: error: ‘hwReadConfig’ was not declared in this scope
      result = hwReadConfig(EEPROM_ROUTES_ADDRESS + node);
                                                        ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp: In function ‘int16_t transportSignalReport(char)’:
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:1180:39: error: expected ‘)’ before ‘PRIu8’
      TRANSPORT_DEBUG(PSTR("TSF:SIR:CMD=%" PRIu8 ",VAL=%" PRIu16 "\n"), reportCommand, result);
                                           ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MyTransport.cpp:1180:2: note: in expansion of macro ‘TRANSPORT_DEBUG’
      TRANSPORT_DEBUG(PSTR("TSF:SIR:CMD=%" PRIu8 ",VAL=%" PRIu16 "\n"), reportCommand, result);
      ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:433:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp: In function ‘void _begin()’:
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:101:18: error: ‘hwWatchdogReset’ was not declared in this scope
      hwWatchdogReset();
                      ^
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:107:35: error: ‘hwInit’ was not declared in this scope
      const bool hwInitResult = hwInit();
                                       ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:113:79: error: expected ‘)’ before ‘PRIu8’
      CORE_DEBUG(PSTR("MCO:BGN:INIT " MY_NODE_TYPE ",CP=" MY_CAPABILITIES ",REL=%" PRIu8 ",VER="
                                                                                   ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:113:2: note: in expansion of macro ‘CORE_DEBUG’
      CORE_DEBUG(PSTR("MCO:BGN:INIT " MY_NODE_TYPE ",CP=" MY_CAPABILITIES ",REL=%" PRIu8 ",VER="
      ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:433:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:115:7: error: in argument to unary !
      if (!hwInitResult) {
           ^
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:139:46: error: ‘hwReadConfigBlock’ was not declared in this scope
                        sizeof(controllerConfig_t));
                                                  ^
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:148:64: error: ‘hwWriteConfig’ was not declared in this scope
      hwWriteConfig(EEPROM_PARENT_NODE_ID_ADDRESS, MY_PARENT_NODE_ID);
                                                                    ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:179:42: error: expected ‘)’ before ‘PRIu8’
      CORE_DEBUG(PSTR("MCO:BGN:INIT OK,TSP=%" PRIu8 "\n"), isTransportReady() && transportSanityCheck());
                                              ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:179:2: note: in expansion of macro ‘CORE_DEBUG’
      CORE_DEBUG(PSTR("MCO:BGN:INIT OK,TSP=%" PRIu8 "\n"), isTransportReady() && transportSanityCheck());
      ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:433:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp: In function ‘bool _processInternalCoreMessage()’:
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:421:13: error: ‘hwReboot’ was not declared in this scope
        hwReboot();
                 ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:427:41: error: expected ‘)’ before ‘PRIu8’
        CORE_DEBUG(PSTR("MCO:PIM:NODE REG=%" PRIu8 "\n"), _coreConfig.nodeRegistered); // node registration
                                             ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:427:4: note: in expansion of macro ‘CORE_DEBUG’
        CORE_DEBUG(PSTR("MCO:PIM:NODE REG=%" PRIu8 "\n"), _coreConfig.nodeRegistered); // node registration
        ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:433:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:434:49: error: ‘hwWriteConfigBlock’ was not declared in this scope
                           sizeof(controllerConfig_t));
                                                     ^
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp: In function ‘void saveState(uint8_t, uint8_t)’:
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:522:54: error: ‘hwWriteConfig’ was not declared in this scope
      hwWriteConfig(EEPROM_LOCAL_CONFIG_ADDRESS+pos, value);
                                                          ^
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp: In function ‘uint8_t loadState(uint8_t)’:
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:526:53: error: ‘hwReadConfig’ was not declared in this scope
      return hwReadConfig(EEPROM_LOCAL_CONFIG_ADDRESS+pos);
                                                         ^
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp: In function ‘void wait(uint32_t)’:
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:532:39: error: ‘hwMillis’ was not declared in this scope
      const uint32_t enteringMS = hwMillis();
                                           ^
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp: In function ‘bool wait(uint32_t, uint8_t, uint8_t)’:
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:540:39: error: ‘hwMillis’ was not declared in this scope
      const uint32_t enteringMS = hwMillis();
                                           ^
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp: In function ‘void doYield()’:
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:553:18: error: ‘hwWatchdogReset’ was not declared in this scope
      hwWatchdogReset();
                      ^
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:555:8: error: ‘yield’ was not declared in this scope
      yield();
            ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp: In function ‘int8_t _sleep(uint32_t, bool, uint8_t, uint8_t, uint8_t, uint8_t)’:
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:565:33: error: expected ‘)’ before ‘PRIu32’
      CORE_DEBUG(PSTR("MCO:SLP:MS=%" PRIu32 ",SMS=%" PRIu8 ",I1=%" PRIu8 ",M1=%" PRIu8 ",I2=%" PRIu8
                                     ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:565:2: note: in expansion of macro ‘CORE_DEBUG’
      CORE_DEBUG(PSTR("MCO:SLP:MS=%" PRIu32 ",SMS=%" PRIu8 ",I1=%" PRIu8 ",M1=%" PRIu8 ",I2=%" PRIu8
      ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:433:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:585:42: error: ‘hwMillis’ was not declared in this scope
       const uint32_t sleepEnterMS = hwMillis();
                                              ^
    In file included from /root/sketchbook/libraries/MySensors/MySensors.h:42:0,
                     from pir_led_v9.ino:8:
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:595:35: error: expected ‘)’ before ‘PRIu32’
        CORE_DEBUG(PSTR("MCO:SLP:MS=%" PRIu32 "\n"), sleepingTimeMS);
                                       ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:595:4: note: in expansion of macro ‘CORE_DEBUG’
        CORE_DEBUG(PSTR("MCO:SLP:MS=%" PRIu32 "\n"), sleepingTimeMS);
        ^
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:656:34: error: expected ‘)’ before ‘PRIi8’
      CORE_DEBUG(PSTR("MCO:SLP:WUP=%" PRIi8 "\n"), result); // sleep wake-up
                                      ^
    /root/sketchbook/libraries/MySensors/MyConfig.h:2091:43: note: in definition of macro ‘DEBUG_OUTPUT’
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /root/sketchbook/libraries/MySensors/core/MySensorsCore.cpp:656:2: note: in expansion of macro ‘CORE_DEBUG’
      CORE_DEBUG(PSTR("MCO:SLP:WUP=%" PRIi8 "\n"), result); // sleep wake-up
    

    Thank you in advance!



  • An update:

    Compilation is successful when using Windows Arduino IDE or VS Code + PlatfromIO on Linux. But as soon as I include <MySensors.h>, the serial monitor output is gibberish (in Windows as well as Linux).

    --- Miniterm on /dev/ttyUSB0  9600,8,N,1 ---
    --- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
    $␎�d�%��8p��␞(  �␙%�
    {$�4
    

    Any thoughts?

    Another Update:
    Changing the baud rate in MyConfig.h to 9600 fixed the gibbersh problem. I have Serial.begin(9600); in my sketch setup.


  • Admin

    MySensors library initializes the serialport itself, and set the baudrate to 115200 on standard arduinos. Regardless of what you are setting in your setup routine.

    Another thing I noticed, is that you are trying to run arduino as root on your linux. This is not recommended, you should always run as a non-priviledged user, and only switch to root when it is absolutely necessary for the thing that you are trying to do.



  • @tbowmo I noticed the same thing about him running as root. It was one of the big red flags that caught my eye.

    @fipster First, as your non root user that you normally log in as, open the arduino IDE and click on File > Preferences. Note the Sketchbook location at the top of the preferences window. On my Fedora linux box it is "/home/{username}/Arduino". If you have all of your sketches in a different folder such as "/root/sketchbook" in your case, copy (or move) the contents of that folder to the listed sketchbook location listed in the IDE. That folder should contain a folder called libraries. The libraries folder is where the MySensors library folder needs to go. Downloading it from github, it might name the folder "MySensors-master". Rename the folder to just "MySensors". Now restart the IDE and load your sketch and see if it will compile by hitting the checkmark icon: 0_1553327131784_0e4878e8-c685-49e6-a095-a26584caeefe-image.png

    It is critical that you restart the IDE after making any changes to the libraries folder and before loading your sketch. This allows the IDE to re-sync the available libraries so your sketch knows they are there. It is also critical that the MySensors library be renamed from it's github name to just "MySensors". If this is not done, the compiler will never find the MySensors.h file.

    Hope that helps.


  • Mod

    @dbemowsk doesn't the Arduino IDE library manager work on linux? The library manager should put MySensors in the right folder, with no need to locate the folder or rename anything.

    But running as root might mess up permissions so maybe that's why things are acting up.


  • Mod

    @fipster define MY_DEBUG and MY_BAUD_RATE to configure how MySensors uses the serial port.



  • @mfalkvidd I guess I had never tried installing the MySensors library through the library manager. I just checked my Library Manager on my linux box and I do see MySensors available. I don't typically do a lot of my Arduino stuff on my linux box. I do the majority of it on my Windows laptop. I had it installed on my linux box mainly for installing Marlin on my 3D printer main board.



  • @dbemowsk @tbowmo @mfalkvidd

    Thank you for the answers! I switched to platformIO and it works like a charm with VS Code on both Linux and Windows.

    I was running root only to test if that could fix the problem. I copied the sketches to root home folder. Got the same error while not root. Also, other libraries work as intended. And there isn't a library manager in Linux.


  • Admin

    @fipster

    I'm using linux and have arduino 1.8.8 installed. There is a library manager in it :).

    I have not had any problems in programming / using mysensors libraries in my setup, and had the libraries installed through the library manager. Works without any issues. This is on a ubuntu 18.10 install though, and not mint.



  • @tbowmo

    You mentioned the version number. I have somehow managed to get a very old IDE. Can't remember where I installed it from, but that seems to be the source of evil.

    Thank you all again!

    0_1553429029185_7545d537-e6c8-47c0-97bb-f2f72964d25b-image.png


Log in to reply
 

Suggested Topics

52
Online

11.4k
Users

11.1k
Topics

112.7k
Posts