Compiling MYSBootloader errors [solved]



  • Hi all,

    in my setup i changed the channel of my sketches in myconfig.h to 120 and set the speed to 1Mbps, i set the speed higher to lower the signal even further on a problematic spot in the garden and forcing that node to use a repeater without hardcoding a parent.

    while trying to get FOTA to work (without succes) i realized that maybe the provided MYSbootloader is listining on the default channel/speed and not reaching my gateway.

    am i right do i need a fresh compiled bootloader using these new settings?
    if yes, can anyone please guide me how to compile the bootloader, iḿ getting nothing but errors.

    "avr-gcc" -x c -mno-interrupts -funsigned-char -funsigned-bitfields -DF_CPU=16000000L-Os -fno-inline-small-functions -fno-split-wide-types -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -Wall -mmcu=atmega328p -c -std=gnu99 -MD -MP -MF "MYSBootloader.d" -MT"MYSBootloader.d" -MT"MYSBootloader.o"  -I../libraries/MySensors/ MYSBootloader.c -o MYSBootloader.o
    In file included from MYSBootloader.h:8:0,
                     from MYSBootloader.c:44:
    /usr/lib/avr/include/util/delay.h:95:3: warning: #warning "Compiler optimizations disabled; functions from <util/delay.h> won't work as designed" [-Wcpp]
     # warning "Compiler optimizations disabled; functions from <util/delay.h> won't work as designed"
       ^
    /usr/lib/avr/include/util/delay.h: In function ‘_delay_ms’:
    <command-line>:0:17: error: ‘Os’ undeclared (first use in this function)
    <command-line>:0:17: note: each undeclared identifier is reported only once for each function it appears in
    /usr/lib/avr/include/util/delay.h: In function ‘_delay_us’:
    <command-line>:0:17: error: ‘Os’ undeclared (first use in this function)
    In file included from ../libraries/MySensors/MySensor.h:26:0,
                     from MYSBootloader.h:11,
                     from MYSBootloader.c:44:
    ../libraries/MySensors/MyHw.h: At top level:
    ../libraries/MySensors/MyHw.h:31:1: error: unknown type name ‘class’
     class MyHw
     ^
    ../libraries/MySensors/MyHw.h:32:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
     { 
     ^
    In file included from ../libraries/MySensors/MySensor.h:27:0,
                     from MYSBootloader.h:11,
                     from MYSBootloader.c:44:
    ../libraries/MySensors/MyTransport.h:32:1: error: unknown type name ‘class’
     class MyTransport
     ^
    ../libraries/MySensors/MyTransport.h:33:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
     {
     ^
    In file included from ../libraries/MySensors/utility/RF24.h:18:0,
                     from ../libraries/MySensors/MyTransportNRF24.h:26,
                     from ../libraries/MySensors/MySensor.h:28,
                     from MYSBootloader.h:11,
                     from MYSBootloader.c:44:
    ../libraries/MySensors/utility/RF24_config.h:17:23: fatal error: WProgram.h: No such file or directory
      #include <WProgram.h>
                           ^
    compilation terminated.
    make: *** [MYSBootloader.o] Error 1
    

    Lot's of syntax errors suggesting the compiler does not understand C++, changing the compiler to avr-cpp or avr-g++ is not helping...

    what am i doing wrong??

    thanx,
    yuri



  • Some additional info i forgot to mention:

    OS: Linux Mint
    Arduino-IDE: 1.6.5

    tried to compile both MySensors-master and development, errors as shown in compile log.
    tried to use provided avr-gcc in github clone and binaries from IDE, more includes needed but still errors like above



  • did i post in the wrong board?
    getting a bit desperate here after day's of searching google, feeding options to get compiler happy...no joy so far 😞

    has anyone ever successfully compiled the MYSBootloader and how did you do it?

    i'm sure i'm missing something in the compiler environment (shell variables and/or libraries), i just cannot find what..

    thanx,
    yuri


  • Admin

    @tekka might have a clue.


  • Admin

    @yugoos said:

    did i post in the wrong board?
    getting a bit desperate here after day's of searching google, feeding options to get compiler happy...no joy so far 😞

    has anyone ever successfully compiled the MYSBootloader and how did you do it?

    i'm sure i'm missing something in the compiler environment (shell variables and/or libraries), i just cannot find what..

    thanx,
    yuri

    I suggest installing Atmel Studio and make sure all dependencies are correct.



  • Hi Tekka,

    thanx for replying, i'l give it a go.
    downloading 560MB in 3..2..1..

    what depedencies are you referring to, mysensors libraries or avr/arduino compilers?

    it could take a while to test this as my everyday laptop is linux based and the old windoze box is not that fast...

    thanx,
    yuri



  • wow, this is some large complex piece of software...
    way over my head i'm afraid.

    being unable to create a bootloader using my channel/bandwith setting, am i now forced to use the defaults if i want FOTA?



  • YAY...I fixed it myself...hopefully

    at some point in troubleshooting all the warnings and errors i thought...could the bootloader source may have been broken when implementing 1.5??
    easy enough to try, so after downloading and linking the 1.4 libs in bootloader subfolder, running make and voila! a new hex-file!!! 😁

    now i have to wait for my new arduino's to test....

    cheers,
    yuri



  • I'm happy to report that my fresh compliled bootloader is working on my network settings.

    I have used Mysensors 1.4 library and included 1.4 mysensors and mysensors/utilities folders in the default makefile as aditional CFLAGS -I parameters

    tested tonight using a nano i found in one of the quadcopters 😉
    working like a charm

    cheers,
    yuri
    P.S. changed the subject to [solved]


Log in to reply
 

Suggested Topics

17
Online

11.4k
Users

11.1k
Topics

112.7k
Posts