Modified MYSBootloader OTA Size/address problem

  • Hello everyone,
    I have followed the OTA guide on the main website and it works flawlessly on many 328p.
    To do so, I have downloaded MYSController and the zip file contains :

    • MYSController.exe
    • MYSControler.ini
    • Firmware folder
    • Bootloader folder :
      - board.txt
      - MYSBootloaderV13pre.hex

    I have read board.txt and added the board to ARDUINO IDE as they mentioned. I burnt the bootloader and it works.

    Now, It i want to change anything in the bootloader( like the NRF channel, Power, data rate, or even a line of code) i would have to rebuild the bootloader with the MYSBootloader github

    I made sure that their make has the correct paths for arv-gcc and so with a shell prompt i launched a "make"

    It outputs this :

    $ make
    rm *.o
    rm *.elf
    rm *.hex
    "C:/WinAVR-20100110/bin/avr-gcc" -I"C:/WinAVR-20100110/avr/include/avr/" -funsigned-char -funsigned-bitfields -DF_CPU=16000000L -DBAUD_RATE=115200 -Os -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -Wall -Wextra -Wundef -pedantic -mmcu=atmega328p -c -std=gnu99 -MD -MP -MF "MYSBootloader.d" -MT"MYSBootloader.d" -MT"MYSBootloader.o"  MYSBootloader.c -o MYSBootloader.o
    In file included from Core.h:40,
                     from MYSBootloader.c:81:
    HW.h:51:4: warning: #warning is a GCC extension
    HW.h:51:4: warning: #warning BAUD_RATE error greater than 2%
    In file included from Core.h:42,
                     from MYSBootloader.c:81:
    MyMessage.h:260: warning: expected [error|warning|ignored] after '#pragma GCC diagnostic'
    MyMessage.h:261: warning: unknown option after '#pragma GCC diagnostic' kind
    MyMessage.h:297: warning: ISO C doesn't support unnamed structs/unions
    MyMessage.h:300: warning: expected [error|warning|ignored] after '#pragma GCC diagnostic'
    "C:/WinAVR-20100110/bin/avr-gcc" -nostartfiles -Wl,-s -Wl,-static -Wl,-Map=".map" -Wl,--start-group -Wl,--end-group -Wl,--gc-sections -mrelax -Wl,-section-start=.text=0x7800 -mmcu=atmega328p   -o MYSBootloader.elf MYSBootloader.o -lm
    "C:/WinAVR-20100110/bin/avr-objcopy" -O ihex -R .eeprom MYSBootloader.elf MYSBootloader.hex
    "C:/WinAVR-20100110/bin/avr-size" MYSBootloader.elf
       text    data     bss     dec     hex filename
       2360       6      71    2437     985 MYSBootloader.elf

    A few warning because of GCC diag ,but no error and i have a MYSBootloader.hex file ready

    All i have to do is to replace the file contained in my


    and from the IDE, using a aspUSB, BURN IT !

    The problem is here : i get this error

    avrdude: reading input file "C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/MySensors/MYSBootloaderV13pre.hex"
    avrdude: ERROR: address 0x8010 out of range at line 129 of C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/MySensors/MYSBootloaderV13pre.hex
    Error while burning bootloader.
    avrdude: read from file 'C:\Program Files (x86)\Arduino\hardware\arduino\avr/bootloaders/MySensors/MYSBootloaderV13pre.hex' failed

    the 0x8010 address is 32784 in DEC which is more than the maximum allow by this line in board.txt and more than the physical flash memory possible on ATmega328p (32768 bytes)


    The question is Why is it outputting a code that has these addresses in its HEX file ?

    How can this be possibly solved ?

    Thank you .

  • Solved !

    Install ATmel Studio and edit Make file PATH for WIN10.

  • Mod

    Great work @, thanks for reporting back!