[ SOLVED ] MyS 2.2.0 - MY_DEBUG fails on certain bootloaders



  • I have started to update my nodes to 2.2.0. The gateway went smooth, and the first nodes were no problem either. These were simple sleeping nodes with a timer to send climate data.

    The next batch were my dimmer nodes that failed to work properly because of a button that was not read anymore (actually, after pressing, the release was not detected. The solution was the PINMODE that was declared in the before() was cleared after Presentation() ).

    When I tried to use MY_DEBUG, the compilation failed. That was Arduino IDE 1.6.13, and after I updated to 1.8.5 it ran once. After that it only failed every time.

    When I changed the board definition to Moteino (I use that for my gateway and 1 sensor) it compiled normally. When I changed back to the bootloader I use on the dimmer board it failed again.

    All my boards are basically the same (except for the two mentioned):

    • ATmega328p; internal 8 MHz clock; 2,7V BOD
    • RFM69 radio (some HW, some W)
    • bootloader by GertSanders: 32p TQFP; 2,7V; 8MHz internal; LED D5; 38k4 upload speed

    I tried to compile with other bootloaders, but a mismatch in baudrate prevented me from uploading the sketch.

    Here is the error log from the IDE:

    In file included from /Users/David/Documents/Arduino/libraries/MySensors/MySensors.h:49:0, from /var/folders/zw/bqygd0w11qd6rb620f1pjy_w0000gn/T/arduino_modified_sketch_112637/sketch_feb06a.ino:90:
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp: In function 'void stInitUpdate()':
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:124:45: error: expected ')' before 'PRIu8'
        TRANSPORT_DEBUG(PSTR("TSM:INIT:STATID=%" PRIu8 "\n"),(uint8_t)MY_NODE_ID);
                                                 ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/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);
        ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp: In function 'void stUplinkUpdate()':
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:265:44: error: expected ')' before 'PRIu8'
        TRANSPORT_DEBUG(PSTR("TSM:UPL:DGWC,O=%" PRIu8 ",N=%" PRIu8 "\n"), _transportConfig.distanceGW,
                                                ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/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,
        ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp: In function 'void stReadyTransition()':
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:292:40: error: expected ')' before 'PRIu8'
      TRANSPORT_DEBUG(PSTR("TSM:READY:ID=%" PRIu8 ",PAR=%" PRIu8 ",DIS=%" PRIu8 "\n"),
                                            ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/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"),
      ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp: In function 'void stFailureTransition()':
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:342:40: error: expected ')' before 'PRIu8'
      TRANSPORT_DEBUG(PSTR("TSM:FAIL:CNT=%" PRIu8 "\n"),_transportSM.failureCounter);
                                            ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:342:2: note: in expansion of macro 'TRANSPORT_DEBUG'
      TRANSPORT_DEBUG(PSTR("TSM:FAIL:CNT=%" PRIu8 "\n"),_transportSM.failureCounter);
      ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp: In function 'bool transportWaitUntilReady(uint32_t)':
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:449:38: error: expected ')' before 'PRIu32'
      TRANSPORT_DEBUG(PSTR("TSF:WUR:MS=%" PRIu32 "\n"), waitingMS); // timeout
                                          ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:449:2: note: in expansion of macro 'TRANSPORT_DEBUG'
      TRANSPORT_DEBUG(PSTR("TSF:WUR:MS=%" PRIu32 "\n"), waitingMS); // timeout
      ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp: In function 'bool transportCheckUplink(bool)':
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:485:44: error: expected ')' before 'PRIu8'
        TRANSPORT_DEBUG(PSTR("TSF:CKU:DGWC,O=%" PRIu8 ",N=%" PRIu8 "\n"), _transportConfig.distanceGW,
                                                ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:485:4: note: in expansion of macro 'TRANSPORT_DEBUG'
        TRANSPORT_DEBUG(PSTR("TSF:CKU:DGWC,O=%" PRIu8 ",N=%" PRIu8 "\n"), _transportConfig.distanceGW,
        ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp: In function 'bool transportAssignNodeID(uint8_t)':
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:504:42: error: expected ')' before 'PRIu8'
       TRANSPORT_DEBUG(PSTR("TSF:SID:OK,ID=%" PRIu8 "\n"),newNodeId); // Node ID assigned
                                              ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:504:3: note: in expansion of macro 'TRANSPORT_DEBUG'
       TRANSPORT_DEBUG(PSTR("TSF:SID:OK,ID=%" PRIu8 "\n"),newNodeId); // Node ID assigned
       ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:507:45: error: expected ')' before 'PRIu8'
       TRANSPORT_DEBUG(PSTR("!TSF:SID:FAIL,ID=%" PRIu8 "\n"),newNodeId); // ID is invalid, cannot assign ID
                                                 ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:507:3: note: in expansion of macro 'TRANSPORT_DEBUG'
       TRANSPORT_DEBUG(PSTR("!TSF:SID:FAIL,ID=%" PRIu8 "\n"),newNodeId); // ID is invalid, cannot assign ID
       ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp: In function 'uint8_t transportPingNode(uint8_t)':
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:612:44: error: expected ')' before 'PRIu8'
       TRANSPORT_DEBUG(PSTR("TSF:PNG:SEND,TO=%" PRIu8 "\n"), targetId);
                                                ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:612:3: note: in expansion of macro 'TRANSPORT_DEBUG'
       TRANSPORT_DEBUG(PSTR("TSF:PNG:SEND,TO=%" PRIu8 "\n"), targetId);
       ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp: In function 'void transportProcessMessage()':
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:660:40: error: expected ')' before 'PRIu8'
      TRANSPORT_DEBUG(PSTR("TSF:MSG:READ,%" PRIu8 "-%" PRIu8 "-%" PRIu8 ",s=%" PRIu8 ",c=%" PRIu8 ",t=%"
                                            ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:660:2: note: in expansion of macro 'TRANSPORT_DEBUG'
      TRANSPORT_DEBUG(PSTR("TSF:MSG:READ,%" PRIu8 "-%" PRIu8 "-%" PRIu8 ",s=%" PRIu8 ",c=%" PRIu8 ",t=%"
      ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:669:41: error: expected ')' before 'PRIu8'
       TRANSPORT_DEBUG(PSTR("!TSF:MSG:LEN,%" PRIu8 "!=%" PRIu8 "\n"), payloadLength,
                                             ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:669:3: note: in expansion of macro 'TRANSPORT_DEBUG'
       TRANSPORT_DEBUG(PSTR("!TSF:MSG:LEN,%" PRIu8 "!=%" PRIu8 "\n"), payloadLength,
       ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:677:42: error: expected ')' before 'PRIu8'
       TRANSPORT_DEBUG(PSTR("!TSF:MSG:PVER,%" PRIu8 "!=%" PRIu8 "\n"), mGetVersion(_msg),
                                              ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:677:3: note: in expansion of macro 'TRANSPORT_DEBUG'
       TRANSPORT_DEBUG(PSTR("!TSF:MSG:PVER,%" PRIu8 "!=%" PRIu8 "\n"), mGetVersion(_msg),
       ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:762:53: error: expected ')' before 'PRIu8'
             TRANSPORT_DEBUG(PSTR("TSF:MSG:FPAR OK,ID=%" PRIu8 ",D=%" PRIu8 "\n"), _transportConfig.parentNodeId,
                                                         ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:762:9: note: in expansion of macro 'TRANSPORT_DEBUG'
             TRANSPORT_DEBUG(PSTR("TSF:MSG:FPAR OK,ID=%" PRIu8 ",D=%" PRIu8 "\n"), _transportConfig.parentNodeId,
             ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:775:49: error: expected ')' before 'PRIu8'
          TRANSPORT_DEBUG(PSTR("TSF:MSG:PINGED,ID=%" PRIu8 ",HP=%" PRIu8 "\n"), sender,
                                                     ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:775:6: note: in expansion of macro 'TRANSPORT_DEBUG'
          TRANSPORT_DEBUG(PSTR("TSF:MSG:PINGED,ID=%" PRIu8 ",HP=%" PRIu8 "\n"), sender,
          ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:789:53: error: expected ')' before 'PRIu8'
           TRANSPORT_DEBUG(PSTR("TSF:MSG:PONG RECV,HP=%" PRIu8 "\n"),
                                                         ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:789:7: note: in expansion of macro 'TRANSPORT_DEBUG'
           TRANSPORT_DEBUG(PSTR("TSF:MSG:PONG RECV,HP=%" PRIu8 "\n"),
           ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp: In function 'bool transportSendWrite(uint8_t, MyMessage&)':
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:1001:42: error: expected ')' before 'PRIu8'
      TRANSPORT_DEBUG(PSTR("%sTSF:MSG:SEND,%" PRIu8 "-%" PRIu8 "-%" PRIu8 "-%" PRIu8 ",s=%" PRIu8 ",c=%"
                                              ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:1001:2: note: in expansion of macro 'TRANSPORT_DEBUG'
      TRANSPORT_DEBUG(PSTR("%sTSF:MSG:SEND,%" PRIu8 "-%" PRIu8 "-%" PRIu8 "-%" PRIu8 ",s=%" PRIu8 ",c=%"
      ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp: In function 'int16_t transportSignalReport(char)':
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:1174:39: error: expected ')' before 'PRIu8'
      TRANSPORT_DEBUG(PSTR("TSF:SIR:CMD=%" PRIu8 ",VAL=%" PRIu16 "\n"), reportCommand, result);
                                           ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MyTransport.cpp:1174:2: note: in expansion of macro 'TRANSPORT_DEBUG'
      TRANSPORT_DEBUG(PSTR("TSF:SIR:CMD=%" PRIu8 ",VAL=%" PRIu16 "\n"), reportCommand, result);
      ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MySensorsCore.cpp: In function 'void _begin()':
    /Users/David/Documents/Arduino/libraries/MySensors/core/MySensorsCore.cpp:171:42: error: expected ')' before 'PRIu8'
      CORE_DEBUG(PSTR("MCO:BGN:INIT OK,TSP=%" PRIu8 "\n"), isTransportReady());
                                              ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MySensorsCore.cpp:171:2: note: in expansion of macro 'CORE_DEBUG'
      CORE_DEBUG(PSTR("MCO:BGN:INIT OK,TSP=%" PRIu8 "\n"), isTransportReady());
      ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MySensorsCore.cpp: In function 'bool _processInternalMessages()':
    /Users/David/Documents/Arduino/libraries/MySensors/core/MySensorsCore.cpp:409:41: error: expected ')' before 'PRIu8'
        CORE_DEBUG(PSTR("MCO:PIM:NODE REG=%" PRIu8 "\n"), _coreConfig.nodeRegistered); // node registration
                                             ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MySensorsCore.cpp:409:4: note: in expansion of macro 'CORE_DEBUG'
        CORE_DEBUG(PSTR("MCO:PIM:NODE REG=%" PRIu8 "\n"), _coreConfig.nodeRegistered); // node registration
        ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MySensorsCore.cpp: In function 'int8_t _sleep(uint32_t, bool, uint8_t, uint8_t, uint8_t, uint8_t)':
    /Users/David/Documents/Arduino/libraries/MySensors/core/MySensorsCore.cpp:542:33: error: expected ')' before 'PRIu32'
      CORE_DEBUG(PSTR("MCO:SLP:MS=%" PRIu32 ",SMS=%" PRIu8 ",I1=%" PRIu8 ",M1=%" PRIu8 ",I2=%" PRIu8
                                     ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MySensorsCore.cpp:542:2: note: in expansion of macro 'CORE_DEBUG'
      CORE_DEBUG(PSTR("MCO:SLP:MS=%" PRIu32 ",SMS=%" PRIu8 ",I1=%" PRIu8 ",M1=%" PRIu8 ",I2=%" PRIu8
      ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MySensorsCore.cpp:572:35: error: expected ')' before 'PRIu32'
        CORE_DEBUG(PSTR("MCO:SLP:MS=%" PRIu32 "\n"), sleepingTimeMS);
                                       ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MySensorsCore.cpp:572:4: note: in expansion of macro 'CORE_DEBUG'
        CORE_DEBUG(PSTR("MCO:SLP:MS=%" PRIu32 "\n"), sleepingTimeMS);
        ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MySensorsCore.cpp:635:34: error: expected ')' before 'PRIi8'
      CORE_DEBUG(PSTR("MCO:SLP:WUP=%" PRIi8 "\n"), result); // sleep wake-up
                                      ^
    /Users/David/Documents/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
                                               ^
    /Users/David/Documents/Arduino/libraries/MySensors/core/MySensorsCore.cpp:635:2: note: in expansion of macro 'CORE_DEBUG'
      CORE_DEBUG(PSTR("MCO:SLP:WUP=%" PRIi8 "\n"), result); // sleep wake-up
      ^ 
    

    I'm not sure why this only occurs with the GertSanders board definitions. I hope we can find a solution on this.



  • I have had a similar experience with different boards. The solution for me was to delete platform.txt in hardware/MySensors/avr - I think some parameters are outdated. What do you think @GertSanders ?


  • Hardware Contributor

    @davidzh

    I can add to this: also the other bootloaders I use have a problem at the same point. The PSTR() expansion seems to fail. I have this same issue with the MightyCore bootloader and with Optiboot 6.x

    The thing is, my atmega328p based nodes work fine without the MY_DEBUG flag.

    So could this be related to the hardware definition ? Looks like it. I will test this further with the suggestion by Alex.


  • Hardware Contributor

    @DavidZH @alexsh1
    The solution to removing the error was indeed to update the platform.txt file.
    I copied the official platform.txt file from the Arduino application to the hardware folder in where my definitions and boot loader sit. The old platform.txt was renamed, and I added the official platform.txt instead.
    That worked.
    I'm assuming that by removing the platform.txt file, the Arduino IDE reverts to it's own platform.txt file, and as I can not see any parameters specific to the atmega328p or other processors, it was probably safe to remove this file.
    I also tested this, and that also solved the error message problem.



  • @GertSanders

    Thank you for calling back! I had the same "issue" my nodes were working so well, no debug was needed, only when I started on a new type I needed to debug some stuff.

    And I had also tried Alex' solution with succes, but have had no time yet to report that.

    I will mark this as solved.



  • Glad it has been sorted. This problem took me by surprise

    @GertSanders you are tinkering with 1284p Mightyduino?


  • Hardware Contributor

    @alexsh1 hi Alex, yes.I was testing stuff with my first atmega1284p arduino clone (made back in 2015). The plan is now to make a smart clock with the mighty beast (lots of program memory, especially nice for extensive menu's).
    But I'm a bit stuck on the fact that I can not get my node recognised on the Domoticz/gateway combo (on a raspi 2).
    At least the compile error is now gone. Onto the next problem: no reply from parent ...



  • @gertsanders said in [ SOLVED ] MyS 2.2.0 - MY_DEBUG fails on certain bootloaders:

    But I'm a bit stuck on the fact that I can not get my node recognised on the Domoticz/gateway combo (on a raspi 2).
    At least the compile error is now gone. Onto the next problem: no reply from parent ...

    Hi, Gert. Interesting. I assume you are talking about nrf24l01+ smd on both ends?
    I am on the same latest beta Domoticz release, but cannot replicate this issue.
    Cannot see anything been done recently to MySensors:
    https://github.com/domoticz/domoticz/commits/development

    How is your atmega1284 hooked up to the transceiver?
    If you wiring is correct, you may want to try this in your sketch:

    #define MY_PASSIVE_NODE
    
    #define MY_PARENT_NODE_IS_STATIC
    #define MY_PARENT_NODE_ID 0
    #define MY_NODE_ID [your number]
    
    

    Another thing - you may try to clear EEPROM and try again.



  • This post is deleted!


  • @GertSanders

    First, please forgive me for being such a NOOB when it comes to these things.

    I use your atmega328p.rar found here for my atmega328p based 28 pin DIL boards.

    Now I'm trying to compile in Arduino 1.8.5 (mysensors 2.2.0) I get a lot of compiler errors when #define MY_DEBUG is set.

    /home/XXX/Arduino/libraries/MySensors/core/MyTransport.cpp: In function 'void stInitUpdate()':
    /home/XXX/Arduino/libraries/MySensors/core/MyTransport.cpp:124:45: error: expected ')' before 'PRIu8'
        TRANSPORT_DEBUG(PSTR("TSM:INIT:STATID=%" PRIu8 "\n"),(uint8_t)MY_NODE_ID);
                                                 ^
    /home/XXX/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
     #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
    etc etc...
    

    I understand that my boards definitions needs to be updated. Do you have a newer version of atmega328p.rar available or can you give me a hint about how to get them working?

    Thanks a million times!

    Cheers!


  • Hardware Contributor

    @รอเร-อ

    We found that in the following directory you can remove the platform.txt file:

    /hardware/atmega328p/avr/platform.txt

    The directory should only contain boards.txt and the subdirectories for boot loaders and variants



  • @gertsanders

    Thanks! Works great! I'm so happy!!! ☺ 😄


Log in to reply
 

Suggested Topics

53
Online

11.4k
Users

11.1k
Topics

112.7k
Posts