My project contains a module which reads memory (SRAM) values of a device during start up (When Power is ON or reset button is pressed). So what I did was , I tried to edit the boot-loader of Arduino Atmega 328P 16 Mhz 5v.
The boot-loader called Optiboot downloaded from https://code.google.com/p/optiboot/ . What I did was, I edited the Optiboot.c file available in the downloaded files with necessary header files, compile it using AVR studio4 and get the hex code. This hex code is burned into arduino device.
My problem is, when I burn the edited boot-loader file into device it is not working. My Boot-Loader size i s 778 bytes.
Another problem is the BAUD_ERROR is always showing greater than 5% error . Also could you please give me what is my fuse settings for the given device. Is I am going in the right direction.
Hope you will definitely help me to sort out this issues.
My project contains a module which reads memory (SRAM) values of a device during start up (When Power is ON or reset button is pressed). So what I did was , I tried to edit the boot-loader of Arduino Atmega 328P 16 Mhz 5v.
What I did was, I edited the Optiboot.c file available in the downloaded files with necessary header files, compile it using AVR studio4 and get the hex code.
That might be a problem. You should use the latest toolchain. AVR Studio 4 is very old. The latest version is Atmel Studio 6.2.
And I still do not understand why you need to read SRAM using bootloader. SRAM is initialized after you leave the bootloader and execute the actual application (.init4 section of the code). All you can read using bootloader is 0xFF or variables that are initialized for your bootloader code (after Power-on reset.. after External reset the situation might be different).
The optiboot is optimized for 512 bytes of memory and adding even a bit more will seriously impact the chip. So you have to be double sure of the code size. FYI there is a make.bat file in the optiboot you can invoke that from the command prompt.
I understand that larger bootloader needs a larger bootloader memory section, but how else does larger program size affect the performance or quality of the bootloader? Never heard that program does not work because it is too large (assuming it still fits the memory it can address).