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. Cant compile 2.01 for atmega168

Cant compile 2.01 for atmega168

Scheduled Pinned Locked Moved Troubleshooting
6 Posts 4 Posters 2.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.
  • M Offline
    M Offline
    Matt
    wrote on last edited by
    #1

    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)

    1 Reply Last reply
    0
    • tbowmoT Offline
      tbowmoT Offline
      tbowmo
      Admin
      wrote on last edited by
      #2

      @Matt

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

      M 1 Reply Last reply
      0
      • tbowmoT tbowmo

        @Matt

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

        M Offline
        M Offline
        Matt
        wrote on last edited by
        #3

        @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....

        YveauxY 1 Reply Last reply
        0
        • M Matt

          @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....

          YveauxY Offline
          YveauxY Offline
          Yveaux
          Mod
          wrote on last edited by
          #4

          @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.

          http://yveaux.blogspot.nl

          M 1 Reply Last reply
          0
          • YveauxY Yveaux

            @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.

            M Offline
            M Offline
            Matt
            wrote on last edited by
            #5

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

            1 Reply Last reply
            0
            • mfalkviddM Offline
              mfalkviddM Offline
              mfalkvidd
              Mod
              wrote on last edited by
              #6

              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/

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


              20

              Online

              11.7k

              Users

              11.2k

              Topics

              113.0k

              Posts


              Copyright 2019 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