Not possible to compile Mysensors 2.1 for Arduino Nano



  • I wanted to upgrade all my nodes to MySensors 2.1.
    The pro minis went without a problem.
    But when i wanted to upload to a Nano i receive this error

    
    
    
    
    
    
    
    
    
    
    Build options changed, rebuilding all
    In file included from sketch\RepeaterNode.ino.cpp:1:0:
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/RF24/RF24.cpp: In function 'void RF24_csn(bool)':
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:152: error: '__digitalPinToPortReg' was not declared in this scope
    
     #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), (uint8_t)__digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                                                            ^
    
    C:\Users\geertm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.13\cores\arduino/Arduino.h:104:30: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                  ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:115: note: in expansion of macro 'bitWrite'
    
     #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), (uint8_t)__digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                       ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:62:40: note: in expansion of macro 'digitalWriteFast'
    
     #define hwDigitalWrite(__pin, __value) digitalWriteFast(__pin, __value)
    
                                            ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/RF24/RF24.cpp:39:2: note: in expansion of macro 'hwDigitalWrite'
    
      hwDigitalWrite(MY_RF24_CS_PIN, level);
    
      ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:187: error: '__digitalPinToBit' was not declared in this scope
    
     #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), (uint8_t)__digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                                                                                               ^
    
    C:\Users\geertm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.13\cores\arduino/Arduino.h:104:49: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                                     ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:115: note: in expansion of macro 'bitWrite'
    
     #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), (uint8_t)__digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                       ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:62:40: note: in expansion of macro 'digitalWriteFast'
    
     #define hwDigitalWrite(__pin, __value) digitalWriteFast(__pin, __value)
    
                                            ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/RF24/RF24.cpp:39:2: note: in expansion of macro 'hwDigitalWrite'
    
      hwDigitalWrite(MY_RF24_CS_PIN, level);
    
      ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/RF24/RF24.cpp: In function 'void RF24_ce(bool)':
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:152: error: '__digitalPinToPortReg' was not declared in this scope
    
     #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), (uint8_t)__digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                                                            ^
    
    C:\Users\geertm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.13\cores\arduino/Arduino.h:104:30: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                  ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:115: note: in expansion of macro 'bitWrite'
    
     #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), (uint8_t)__digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                       ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:62:40: note: in expansion of macro 'digitalWriteFast'
    
     #define hwDigitalWrite(__pin, __value) digitalWriteFast(__pin, __value)
    
                                            ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/RF24/RF24.cpp:44:2: note: in expansion of macro 'hwDigitalWrite'
    
      hwDigitalWrite(MY_RF24_CE_PIN, level);
    
      ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:187: error: '__digitalPinToBit' was not declared in this scope
    
     #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), (uint8_t)__digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                                                                                               ^
    
    C:\Users\geertm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.13\cores\arduino/Arduino.h:104:49: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                                     ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:115: note: in expansion of macro 'bitWrite'
    
     #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), (uint8_t)__digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)
    
                                                                                                                       ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:62:40: note: in expansion of macro 'digitalWriteFast'
    
     #define hwDigitalWrite(__pin, __value) digitalWriteFast(__pin, __value)
    
                                            ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/RF24/RF24.cpp:44:2: note: in expansion of macro 'hwDigitalWrite'
    
      hwDigitalWrite(MY_RF24_CE_PIN, level);
    
      ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/RF24/RF24.cpp: In function 'bool RF24_initialize()':
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:91:170: error: '__digitalPinToDDRReg' was not declared in this scope
    
     #define pinModeFast(__pin, __mode) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__mode) && (__mode!=INPUT_PULLUP)) { bitWrite(*__digitalPinToDDRReg(__pin), (uint8_t)__digitalPinToBit(__pin), (__mode)); } else { pinMode((__pin), (__mode)); } } while (0)
    
                                                                                                                                                                              ^
    
    C:\Users\geertm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.13\cores\arduino/Arduino.h:104:30: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                  ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:91:134: note: in expansion of macro 'bitWrite'
    
     #define pinModeFast(__pin, __mode) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__mode) && (__mode!=INPUT_PULLUP)) { bitWrite(*__digitalPinToDDRReg(__pin), (uint8_t)__digitalPinToBit(__pin), (__mode)); } else { pinMode((__pin), (__mode)); } } while (0)
    
                                                                                                                                          ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:64:35: note: in expansion of macro 'pinModeFast'
    
     #define hwPinMode(__pin, __value) pinModeFast(__pin, __value)
    
                                       ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/RF24/RF24.cpp:388:2: note: in expansion of macro 'hwPinMode'
    
      hwPinMode(MY_RF24_CE_PIN,OUTPUT);
    
      ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:91:205: error: '__digitalPinToBit' was not declared in this scope
    
     #define pinModeFast(__pin, __mode) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__mode) && (__mode!=INPUT_PULLUP)) { bitWrite(*__digitalPinToDDRReg(__pin), (uint8_t)__digitalPinToBit(__pin), (__mode)); } else { pinMode((__pin), (__mode)); } } while (0)
    
                                                                                                                                                                                                                 ^
    
    C:\Users\geertm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.13\cores\arduino/Arduino.h:104:49: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                                     ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:91:134: note: in expansion of macro 'bitWrite'
    
     #define pinModeFast(__pin, __mode) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__mode) && (__mode!=INPUT_PULLUP)) { bitWrite(*__digitalPinToDDRReg(__pin), (uint8_t)__digitalPinToBit(__pin), (__mode)); } else { pinMode((__pin), (__mode)); } } while (0)
    
                                                                                                                                          ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:64:35: note: in expansion of macro 'pinModeFast'
    
     #define hwPinMode(__pin, __value) pinModeFast(__pin, __value)
    
                                       ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/RF24/RF24.cpp:388:2: note: in expansion of macro 'hwPinMode'
    
      hwPinMode(MY_RF24_CE_PIN,OUTPUT);
    
      ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:91:170: error: '__digitalPinToDDRReg' was not declared in this scope
    
     #define pinModeFast(__pin, __mode) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__mode) && (__mode!=INPUT_PULLUP)) { bitWrite(*__digitalPinToDDRReg(__pin), (uint8_t)__digitalPinToBit(__pin), (__mode)); } else { pinMode((__pin), (__mode)); } } while (0)
    
                                                                                                                                                                              ^
    
    C:\Users\geertm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.13\cores\arduino/Arduino.h:104:30: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                  ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:91:134: note: in expansion of macro 'bitWrite'
    
     #define pinModeFast(__pin, __mode) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__mode) && (__mode!=INPUT_PULLUP)) { bitWrite(*__digitalPinToDDRReg(__pin), (uint8_t)__digitalPinToBit(__pin), (__mode)); } else { pinMode((__pin), (__mode)); } } while (0)
    
                                                                                                                                          ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:64:35: note: in expansion of macro 'pinModeFast'
    
     #define hwPinMode(__pin, __value) pinModeFast(__pin, __value)
    
                                       ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/RF24/RF24.cpp:389:2: note: in expansion of macro 'hwPinMode'
    
      hwPinMode(MY_RF24_CS_PIN,OUTPUT);
    
      ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:91:205: error: '__digitalPinToBit' was not declared in this scope
    
     #define pinModeFast(__pin, __mode) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__mode) && (__mode!=INPUT_PULLUP)) { bitWrite(*__digitalPinToDDRReg(__pin), (uint8_t)__digitalPinToBit(__pin), (__mode)); } else { pinMode((__pin), (__mode)); } } while (0)
    
                                                                                                                                                                                                                 ^
    
    C:\Users\geertm\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.13\cores\arduino/Arduino.h:104:49: note: in definition of macro 'bitSet'
    
     #define bitSet(value, bit) ((value) |= (1UL << (bit)))
    
                                                     ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:91:134: note: in expansion of macro 'bitWrite'
    
     #define pinModeFast(__pin, __mode) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__mode) && (__mode!=INPUT_PULLUP)) { bitWrite(*__digitalPinToDDRReg(__pin), (uint8_t)__digitalPinToBit(__pin), (__mode)); } else { pinMode((__pin), (__mode)); } } while (0)
    
                                                                                                                                          ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:64:35: note: in expansion of macro 'pinModeFast'
    
     #define hwPinMode(__pin, __value) pinModeFast(__pin, __value)
    
                                       ^
    
    C:\Users\geertm\Documents\Arduino\libraries\MySensors/drivers/RF24/RF24.cpp:389:2: note: in expansion of macro 'hwPinMode'
    
      hwPinMode(MY_RF24_CS_PIN,OUTPUT);
    
      ^
    
    exit status 1
    Error compiling for board Arduino Nano.
    
    

    Am i doing something wrong or is there a bug in version 2.1?



  • already found the solution.
    Apparently it's not possible to run mysensors on ar 168 arduino.
    Strange that i succeeded to run version 2.0 on a 168 version



  • @Geert-Massa :
    I got identical error messages when I tried to compile for my Pro-mini 168.

    So far I understand there is no support for ATMega 168 with Mysensors (sadly).

    As a legacy (I think) you can choose in the "TOOL"-menu, submenu "Processor" between ATMega328 and ATMega168 (which was used for Nanos until V2.3). Be sure to select "ATMega328".

    If you got a V2.3 Nano - you are in trouble.



  • @Geert-Massa
    Sorry for "double" posting - my browser doesn't update while writing.


  • Mod

    Support for atmega168 has been added in the development version of MySensors. More information: https://forum.mysensors.org/topic/5727/compile-error-for-pro-mini-5-5v-168/8

    However, note that due to the small flash size of the atmega168, quite few sketches will fit.


Log in to reply
 

Suggested Topics

  • 3
  • 1
  • 6
  • 2
  • 8
  • 6

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts