Senserbender gateway problem dtostrf.h



  • Dear forum, can you help me solving a blocking problem I encountered when compiling the sketch SensebenderSerialGateway. I am using Arduino IDE 1.8.13 and added Arduino SAMD and Mysensor SAMD boards via the board manager. Mysensors is working fine for other boards like ESP8266, ESP32 and Arduino Pro Mini. However for the Sensebender the IDE returns a error with dtostrf.h.

    Copy or error message:

    Arduino: 1.8.13 (Windows 10), Board: "Sensebender Gateway"
    
    C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\ServerBeheer\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\ServerBeheer\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\ServerBeheer\Documents\Arduino\libraries -fqbn=MySensors:samd:mysensors_gw_native -ide-version=10813 -build-path C:\Users\SERVER~1\AppData\Local\Temp\arduino_build_549609 -warnings=all -build-cache C:\Users\SERVER~1\AppData\Local\Temp\arduino_cache_686075 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.CMSIS.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.CMSIS-4.5.0.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.arduinoOTA.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4 -prefs=runtime.tools.arm-none-eabi-gcc-7-2017q4.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4 -prefs=runtime.tools.openocd.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7 -prefs=runtime.tools.openocd-0.10.0-arduino7.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7 -prefs=runtime.tools.CMSIS-Atmel.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0 -prefs=runtime.tools.CMSIS-Atmel-1.2.0.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0 -prefs=runtime.tools.bossac.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3 -prefs=runtime.tools.bossac-1.7.0-arduino3.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3 -verbose C:\Users\ServerBeheer\Documents\Arduino\SensebenderGatewaySerial\SensebenderGatewaySerial.ino
    
    C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\ServerBeheer\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\ServerBeheer\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\ServerBeheer\Documents\Arduino\libraries -fqbn=MySensors:samd:mysensors_gw_native -ide-version=10813 -build-path C:\Users\SERVER~1\AppData\Local\Temp\arduino_build_549609 -warnings=all -build-cache C:\Users\SERVER~1\AppData\Local\Temp\arduino_cache_686075 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.CMSIS.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.CMSIS-4.5.0.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.arduinoOTA.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4 -prefs=runtime.tools.arm-none-eabi-gcc-7-2017q4.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4 -prefs=runtime.tools.openocd.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7 -prefs=runtime.tools.openocd-0.10.0-arduino7.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7 -prefs=runtime.tools.CMSIS-Atmel.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0 -prefs=runtime.tools.CMSIS-Atmel-1.2.0.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0 -prefs=runtime.tools.bossac.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3 -prefs=runtime.tools.bossac-1.7.0-arduino3.path=C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3 -verbose C:\Users\ServerBeheer\Documents\Arduino\SensebenderGatewaySerial\SensebenderGatewaySerial.ino
    
    Using board 'mysensors_gw_native' from platform in folder: C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.6
    
    Using core 'arduino' from platform in folder: C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11
    
    Detecting libraries used...
    
    "C:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10813 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x1209 -DUSB_PID=0x6949 -DUSBCON "-DUSB_MANUFACTURER=\"MySensors.org\"" "-DUSB_PRODUCT=\"Sensebender GW\"" "-IC:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS\\4.5.0/CMSIS/Include/" "-IC:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS-Atmel\\1.2.0/CMSIS/Device/ATMEL/" "-IC:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.11\\cores\\arduino" "-IC:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\MySensors\\hardware\\samd\\1.0.6\\variants\\mysensors_gw" "C:\\Users\\SERVER~1\\AppData\\Local\\Temp\\arduino_build_549609\\sketch\\SensebenderGatewaySerial.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
    
    Alternatives for MySensors.h: [arduino_168324@2.3.2]
    
    ResolveLibrary(MySensors.h)
    
      -> candidates: [arduino_168324@2.3.2]
    
    "C:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10813 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x1209 -DUSB_PID=0x6949 -DUSBCON "-DUSB_MANUFACTURER=\"MySensors.org\"" "-DUSB_PRODUCT=\"Sensebender GW\"" "-IC:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS\\4.5.0/CMSIS/Include/" "-IC:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS-Atmel\\1.2.0/CMSIS/Device/ATMEL/" "-IC:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.11\\cores\\arduino" "-IC:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\MySensors\\hardware\\samd\\1.0.6\\variants\\mysensors_gw" "-IC:\\Users\\ServerBeheer\\Documents\\Arduino\\libraries\\arduino_168324" "C:\\Users\\SERVER~1\\AppData\\Local\\Temp\\arduino_build_549609\\sketch\\SensebenderGatewaySerial.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
    
    Alternatives for Wire.h: [Wire@1.0]
    
    ResolveLibrary(Wire.h)
    
      -> candidates: [Wire@1.0]
    
    "C:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10813 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x1209 -DUSB_PID=0x6949 -DUSBCON "-DUSB_MANUFACTURER=\"MySensors.org\"" "-DUSB_PRODUCT=\"Sensebender GW\"" "-IC:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS\\4.5.0/CMSIS/Include/" "-IC:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS-Atmel\\1.2.0/CMSIS/Device/ATMEL/" "-IC:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.11\\cores\\arduino" "-IC:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\MySensors\\hardware\\samd\\1.0.6\\variants\\mysensors_gw" "-IC:\\Users\\ServerBeheer\\Documents\\Arduino\\libraries\\arduino_168324" "-IC:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.11\\libraries\\Wire" "C:\\Users\\SERVER~1\\AppData\\Local\\Temp\\arduino_build_549609\\sketch\\SensebenderGatewaySerial.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
    
    Alternatives for SPI.h: [SPI@1.0]
    
    ResolveLibrary(SPI.h)
    
      -> candidates: [SPI@1.0]
    
    "C:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10813 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x1209 -DUSB_PID=0x6949 -DUSBCON "-DUSB_MANUFACTURER=\"MySensors.org\"" "-DUSB_PRODUCT=\"Sensebender GW\"" "-IC:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS\\4.5.0/CMSIS/Include/" "-IC:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS-Atmel\\1.2.0/CMSIS/Device/ATMEL/" "-IC:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.11\\cores\\arduino" "-IC:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\MySensors\\hardware\\samd\\1.0.6\\variants\\mysensors_gw" "-IC:\\Users\\ServerBeheer\\Documents\\Arduino\\libraries\\arduino_168324" "-IC:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.11\\libraries\\Wire" "-IC:\\Users\\ServerBeheer\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\samd\\1.8.11\\libraries\\SPI" "C:\\Users\\SERVER~1\\AppData\\Local\\Temp\\arduino_build_549609\\sketch\\SensebenderGatewaySerial.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
    
    Alternatives for avr/dtostrf.h: []
    
    ResolveLibrary(avr/dtostrf.h)
    
      -> candidates: []
    
    In file included from C:\Users\ServerBeheer\Documents\Arduino\libraries\arduino_168324/hal/architecture/SAMD/MyHwSAMD.cpp:20:0,
    
                     from C:\Users\ServerBeheer\Documents\Arduino\libraries\arduino_168324/MySensors.h:68,
    
                     from C:\Users\ServerBeheer\Documents\Arduino\SensebenderGatewaySerial\SensebenderGatewaySerial.ino:86:
    
    C:\Users\ServerBeheer\Documents\Arduino\libraries\arduino_168324/hal/architecture/SAMD/MyHwSAMD.h:23:10: fatal error: avr/dtostrf.h: No such file or directory
    
     #include <avr/dtostrf.h>
    
              ^~~~~~~~~~~~~~~
    
    compilation terminated.
    
    Using library arduino_168324 at version 2.3.2 in folder: C:\Users\ServerBeheer\Documents\Arduino\libraries\arduino_168324 
    
    Using library Wire at version 1.0 in folder: C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\libraries\Wire 
    
    Using library SPI at version 1.0 in folder: C:\Users\ServerBeheer\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\libraries\SPI 
    
    exit status 1
    
    Error compiling for board Sensebender Gateway.
    


  • @Geelbuik A SAMD board uses another architecture then AVR boards.
    You can try with adding an #include <avr/dtostrf.h> at the top of the sketch to see if it will work.

    For more information, see https://forum.arduino.cc/index.php?topic=378874.0



  • @evb , thank you for the tip. I tried it right away. Unfortunately the compilation is terminated with the message fatal error: avr/dtostrf.h: No such file or directory.

    Arduino:1.8.13 (Windows 10), Board:"Sensebender Gateway"

    C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\mvvdi\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\mvvdi\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\mvvdi\Documents\Arduino\libraries -fqbn=MySensors:samd:mysensors_gw_native -ide-version=10813 -build-path C:\Users\mvvdi\AppData\Local\Temp\arduino_build_179349 -warnings=all -build-cache C:\Users\mvvdi\AppData\Local\Temp\arduino_cache_365275 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.CMSIS-Atmel.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0 -prefs=runtime.tools.CMSIS-Atmel-1.2.0.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0 -prefs=runtime.tools.bossac.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3 -prefs=runtime.tools.bossac-1.7.0-arduino3.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3 -prefs=runtime.tools.CMSIS.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.CMSIS-4.5.0.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.openocd.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7 -prefs=runtime.tools.openocd-0.10.0-arduino7.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4 -prefs=runtime.tools.arm-none-eabi-gcc-7-2017q4.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4 -prefs=runtime.tools.arduinoOTA.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -verbose C:\Users\mvvdi\AppData\Local\Temp\arduino_modified_sketch_589425\SensebenderGatewaySerial.ino

    C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\mvvdi\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\mvvdi\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\mvvdi\Documents\Arduino\libraries -fqbn=MySensors:samd:mysensors_gw_native -ide-version=10813 -build-path C:\Users\mvvdi\AppData\Local\Temp\arduino_build_179349 -warnings=all -build-cache C:\Users\mvvdi\AppData\Local\Temp\arduino_cache_365275 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.CMSIS-Atmel.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0 -prefs=runtime.tools.CMSIS-Atmel-1.2.0.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0 -prefs=runtime.tools.bossac.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3 -prefs=runtime.tools.bossac-1.7.0-arduino3.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3 -prefs=runtime.tools.CMSIS.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.CMSIS-4.5.0.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.openocd.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7 -prefs=runtime.tools.openocd-0.10.0-arduino7.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4 -prefs=runtime.tools.arm-none-eabi-gcc-7-2017q4.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4 -prefs=runtime.tools.arduinoOTA.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -verbose C:\Users\mvvdi\AppData\Local\Temp\arduino_modified_sketch_589425\SensebenderGatewaySerial.ino

    Using board 'mysensors_gw_native' from platform in folder: C:\Users\mvvdi\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.6

    Using core 'arduino' from platform in folder: C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11

    Detecting libraries used...

    "C:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10813 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x1209 -DUSB_PID=0x6949 -DUSBCON "-DUSB_MANUFACTURER="MySensors.org"" "-DUSB_PRODUCT="Sensebender GW"" "-IC:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/" "-IC:\Users\mvvdi\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\cores\arduino" "-IC:\Users\mvvdi\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.6\variants\mysensors_gw" "C:\Users\mvvdi\AppData\Local\Temp\arduino_build_179349\sketch\SensebenderGatewaySerial.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

    Alternatives for avr/dtostrf.h: []

    ResolveLibrary(avr/dtostrf.h)SensebenderGatewaySerial:38:10: fatal error: avr/dtostrf.h: No such file or directory

    -> candidates: [] #include <avr/dtostrf.h>

          ^~~~~~~~~~~~~~~
    

    compilation terminated.

    exit status 1

    avr/dtostrf.h: No such file or directory



  • @evb when I open the board manager I am getting these messages about two index erros for reference tools. No sure what this means. Could it be that dtostrf.h is not downloaded properly?

    Index error: could not find referenced tool name=gcc-arm-none-eabi version=5_2-2015q4 packager=sandeepmistry
    Index error: could not find referenced tool name=openocd version=0.10.0-dev.nrf5 packager=sandeepmistry



  • Try to downgrade the SAMD core ("Arduino SAMD Boards" in the boards manager) to 1.8.9 and it should compile. They seem to have introduced some breaking changes with 1.8.10 (see release notes).



  • I tried to compile the sketch for the Sensebender Gateway Sam M0, but indeed with version 1.8.11 Arduino SAMD boards (32-bits ARM Cortex-M0+), this doesn't compile.

    To correct the error #include <avr/dtostrf.h> not found, we can adapt the MySensors hal implementation
    C:\Users\YourUserName\Documents\Arduino\libraries\MySensors\hal\architecture\SAMD\MyHwSAMD.h

    /*
     * The MySensors Arduino library handles the wireless radio link and protocol
     * between your home built sensors/actuators and HA controller of choice.
     * The sensors forms a self healing radio network with optional repeaters. Each
     * repeater and gateway builds a routing tables in EEPROM which keeps track of the
     * network topology allowing messages to be routed to nodes.
     *
     * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
     * Copyright (C) 2013-2019 Sensnology AB
     * Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
     *
     * Documentation: http://www.mysensors.org
     * Support Forum: http://forum.mysensors.org
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License
     * version 2 as published by the Free Software Foundation.
     */
    #ifndef MyHwSAMD_h
    #define MyHwSAMD_h
    
    #include <SPI.h>
    #include <avr/dtostrf.h>
    
    #ifdef __cplusplus
    #include <Arduino.h>
    #endif
    

    Replace in the above code the line

    #include <avr/dtostrf.h>
    

    by

    #include <api/deprecated-avr-comp/avr/dtostrf.h>
    

    Then the compiler will go further, to the next error 😞

    C:\Users\YourUserName\Documents\Arduino\libraries\SD\src/utility/SdFat.h:31:10: fatal error: Print.h: No such file or directory
     Not used: C:\Users\YourUserName\Documents\Arduino\libraries\SPI
     #include <Print.h>
    

    This is going to take us too far...
    This is also not the way to take. In the correction above, we've introduced already a deprecated path....

    The solution is or going back to an older implementation like @BearWithBeard is suggesting
    or hoping that @tekka (I'm not sure if the tekka007 on github is the same as here 😉 ) can do an update of the MySensors SamD board implementation on https://github.com/mysensors/ArduinoBoards



  • @BearWithBeard thank you for the solution. I downgraded Arduino SAMD to 1.8.9. This solved the problem. Many thanks.



Suggested Topics

12
Online

11.4k
Users

11.1k
Topics

112.7k
Posts