system
November 3, 2012, 10:46am
1
Hi All,
I would like to have a bootloader for Mega 2560 board but with programming upload baudrate at 57600
The current is 115200, i tried to recompile the stk500boot.c but got error when do "make"
i'm running windows XP.
Could you please make me the bootloader or help me to recompile it.
I just need to change the baudrate, nothing else.
Thanks,
Cuong
cuongvd@yahoo.com
I have this solved for awhile but forgot to post it.
Here what i did:
First, i have to change the stk500boot.c which contains the boot loader for Mega
#define UART_BAUD_SELECT(baudRate,xtalCpu) (33) //33 for 57600, 16 for 115200
i changed to 33 for 57600, default was 16 for 115200
Then recompiled it to get the boot loader file (.Hex)
Second, I have to replace the original boot loader in the Mega2560 by program direct to the ICSP port.
Third, i have to create 1 new board into the file boards.txt to let the arduino program communicate at 57600 instead of 115200
##############################################################
mega2560_57600.name=Arduino Mega 2560 or Mega ADK (57600bps) - Cuong
mega2560_57600.upload.protocol=stk500v2
mega2560_57600.upload.maximum_size=258048
mega2560_57600.upload.speed=57600
mega2560_57600.bootloader.low_fuses=0xFF
mega2560_57600.bootloader.high_fuses=0xD8
mega2560_57600.bootloader.extended_fuses=0xFD
mega2560_57600.bootloader.path=stk500v2
mega2560_57600.bootloader.file=stk500boot_v2_mega2560_57600.hex
mega2560_57600.bootloader.unlock_bits=0x3F
mega2560_57600.bootloader.lock_bits=0x0F
mega2560_57600.build.mcu=atmega2560
mega2560_57600.build.f_cpu=16000000L
mega2560_57600.build.core=arduino
mega2560_57600.build.variant=mega
Thanks,
Cuong.