I recently finished development of firmware upgrade for MC9S08DZ60 using bootloader using UART via GPRS modem.
My application works great with stack size of 0x280 bytes.
My bootloader has stack size of 0x250 bytes.
I have noticed weird behavior in my application when it is loaded from BL:
I have the following stack:
#define MODEM_RESPONSE_BUFF_SIZE 0xD2
typedef struct _MODEM_RESPONSE
The weird behavior is that in some cases when I clear Response buff using MEMSET(), TempResponse buff data is being set with garbage.
I was thinking that maybe it is related to the fact that the BL stack size is small and needs to be increased. The problem is that when I set BL stack size to the same stack size of the app the application also starts having weird behaviors (UART).
Which stack size effects the app stack size, the one in the app prm or the one in the BL prm?