Using 2.2.x MySensors library in Sloeber (Eclipse Arduino IDE). Build errors. (Solved)



  • I wanted to use the 2.2.x development branch in my project. So, I swapped out the code that Sloeber adds when you add the MySensors 2.1.1 release version with the latest code from the Github repo.

    Context: This is for a PIR motion sensor using the NRF24L01+ radio.

    I.e.: Replace: /Applications/sloeber 4.app/Contents/Eclipse/arduinoPlugin/libraries/MySensors/2.1.1 with the contents of git clone https://github.com/mysensors/MySensors.git 2.1.1

    I tried building my project (a PIR node), and got several build errors.

    Example build errors:

    'int16_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 118 C/C++ Problem
    'int16_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 123 C/C++ Problem
    'int16_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 128 C/C++ Problem
    'int16_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 133 C/C++ Problem
    'int16_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 138 C/C++ Problem
    'int16_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 143 C/C++ Problem
    'uint8_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 68 C/C++ Problem
    'uint8_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 72 C/C++ Problem
    'uint8_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 81 C/C++ Problem
    'uint8_t' does not name a type MyTransportHAL.h /MotionSensorBattery/libraries/MySensors/hal/transport line 97 C/C++ Problem
    Function 'NRF5_ESB_getNodeID' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 65 Semantic Error
    Function 'NRF5_ESB_getReceivingRSSI' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 137 Semantic Error
    Function 'NRF5_ESB_getSendingRSSI' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 132 Semantic Error
    Function 'NRF5_ESB_initialize' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 54 Semantic Error
    Function 'NRF5_ESB_isDataAvailable' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 86 Semantic Error
    Function 'NRF5_ESB_powerDown' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 112 Semantic Error
    Function 'NRF5_ESB_powerUp' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 117 Semantic Error
    Function 'NRF5_ESB_readMessage' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 97 Semantic Error
    Function 'NRF5_ESB_sanityCheck' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 91 Semantic Error
    Function 'NRF5_ESB_sendMessage' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 80 Semantic Error
    Function 'NRF5_ESB_setNodeAddress' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 59 Semantic Error
    Function 'NRF5_ESB_sleep' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 122 Semantic Error
    Function 'NRF5_ESB_standBy' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 127 Semantic Error
    Function 'NRF5_ESB_startListening' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 60 Semantic Error
    Function 'NRF5_getTxPowerLevel' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 157 Semantic Error
    Function 'NRF5_getTxPowerPercent' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 152 Semantic Error
    Function 'NRF5_setTxPowerPercent' could not be resolved MyTransportNRF5_ESB.cpp /MotionSensorBattery/libraries/MySensors/hal/transport line 162 Semantic Error
    make: *** [libraries/MySensors/hal/transport/MyTransportRF24.cpp.o] Error 1 MotionSensorBattery C/C++ Problem

    To fix this, I simply excluded the ./hal directory from the build. Everything appears to work fine now.

    I.e.: expand libraries > expand MySensors > right click the ./hal directory > Properties > select C/C++ Build > tick Exclude resource from build.

    Can anyone shed some light on the work being done in the ./hal directory? Am I messing something up by excluding this from my build?


Log in to reply
 

384
Online

6.9k
Users

7.8k
Topics

82.9k
Posts

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.