I am trying to figure out what is the thing with my MCU - 1284p . So the scenario is like this. I made a program that sends commands to a SIM module . If I upload the program without the bootloader on the MCU, the program works fine and I have no memory flows. As soon as i upload with the bootloader the program starts to work bad. After days of trial I can't figure it out. I extracted some screenshots maybe someone will give me a hint. The bootloader had in the first try allocated 4096 bytes and the memory after I read it from the MCU looks like this.
The first thing was to shrink the bootloader memory so I modified it at half, meaning 2048 bytes. The allocation looks the same and the last command is not written into memory, if you look in the picture it is rate failed . . . AT it should be "AT+CGNSCMD=0,\"$PMTK300,200,0,0,0,0*2F\"" .
The hex file read from the MCU with the modification to the bootloader looks like this.
And the problem from where it started it is in the last picture where the terminal shows what I actually sends the MCU to the SIM868 module.
I checked everything from memory allocation to bad pointers etc.