Cant compile 2.01 for atmega168



  • I did have mys 1.6 running on these nodes with debug disabled, just tried to update to 2.0 and it wont compile..
    I think there are firmware settings somewhere in the core for the 328 only in v2.0?
    Something to do with MyHwATMega328.h ? Sorry if this is covered elsewhere...
    Compile errors below...

    In file included from C:\Users\Admin\AppData\Local\Temp\arduino_build_748184\sketch\TempHumBatgood2.ino.cpp:1:0:

    C:\Users\Admin\Documents\Arduino\libraries\MySensors/drivers/RF24/RF24.cpp: In function 'void RF24_csn(bool)':

    C:\Users\Admin\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:154: 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), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)

                                                                                                                                                          ^
    

    C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:112:30: note: in definition of macro 'bitSet'

    #define bitSet(value, bit) ((value) |= (1UL << (bit)))

                              ^
    

    C:\Users\Admin\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:117: note: in expansion of macro 'bitWrite'

    #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)

                                                                                                                     ^
    

    C:\Users\Admin\Documents\Arduino\libraries\MySensors/core/MyHwATMega328.h:60:40: note: in expansion of macro 'digitalWriteFast'

    #define hwDigitalWrite(__pin, __value) digitalWriteFast(__pin, __value)

                                        ^
    

    C:\Users\Admin\Documents\Arduino\libraries\MySensors/drivers/RF24/RF24.cpp:39:5: note: in expansion of macro 'hwDigitalWrite'

     hwDigitalWrite(MY_RF24_CS_PIN, level);
    
     ^
    

    C:\Users\Admin\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:180: 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), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)

                                                                                                                                                                                    ^
    

    C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:112:49: note: in definition of macro 'bitSet'

    #define bitSet(value, bit) ((value) |= (1UL << (bit)))

                                                 ^
    

    C:\Users\Admin\Documents\Arduino\libraries\MySensors/drivers/AVR/DigitalWriteFast/digitalWriteFast.h:88:117: note: in expansion of macro 'bitWrite'

    #define digitalWriteFast(__pin, __value) do { if (__builtin_constant_p(__pin) && __builtin_constant_p(__value)) { bitWrite(*__digitalPinToPortReg(__pin), __digitalPinToBit(__pin), (__value)); } else { digitalWrite((__pin), (__value)); } } while (0)


  • Admin

    @Matt

    The atmega168 is not officially supported, due to the low flash / ram size, compared to atmega328



  • @tbowmo thanks for your reply, yep I am aware of that, however I do have a couple of 168 modules running MYS 1.6.x. that I was hoping to upgrade.
    Simply disabling my_debug was enough to get it small enough to stick on the 168 using v1.6.
    Im guessing its non-trivial to get 2.0.x to compile for the 168 nowadays, seems to be throwing a lot of non-size related errors in the compiler....


  • Mod

    @Matt Quickly going over the errors it seems like they are caused by the DigitalWriteFast driver library.
    If you add support for ATmega168 to this library, MySensors 2.x might just build with debugging disabled.
    To my knowledge the library has only gotten smaller since 1.x.



  • @Yveaux hey thanks, no idea on how to do that lol but will have a google around....


  • Mod

    Support for atmega168 has been added in the development version of MySensors and will be available in the next stable release. More info in https://forum.mysensors.org/topic/5727/compile-error-for-pro-mini-5-5v-168/


Log in to reply
 

Suggested Topics

  • 3
  • 6
  • 2
  • 6
  • 1

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts