After playing a while with the avrubd and being in need for a OTA. I started modifying the AVRUBD in order to load code on my 1284p through BLE. The problem is that the memory settings kill me and also the fuse settings a little bit. I want to check with you guys a little bit the fuse setting in order not to make any mistake.
So the bootloader Boot flash size = 4096 word boot address $F000
The stats for MCU
Program Memory Usage : 62994 bytes 48.1 % Full
Data Memory Usage : 9828 bytes 60.0 % Full
EEPROM Memory Usage : 674 bytes 16.5 % Full
I have tested without bootloader for some time and i got no problem. As soon as I program the bootloader and I load the code through Bluetooth at the first run, it goes smoothly, when i restart it, it crashes and my MCU starts restarting. What is odd is that it does not restart and enter the bootloader, it starts directly with the code I have made.
Maybe I need to mention that I compile in debug mode.