I’ve been able to successfully run the windows OTA demo. Now I would like to tryout some different configurations.
When I change the fileblocksize from 2048 to 512 the application throws an exception in queue.c (see attachment).
I’m in the process of porting the demo to my microcontroller platform, on which I would like to set the fileblock size to 512 to keep RAM usage low. But I guess if the windows demo throws an exception, my port will too, so I would first like to solve it on windows.
Anyone here with a suggestion on how to approach this? Its quite a struggle for me to debug code written by someone else.
Observed on FreeRTOSv202112.00
What was the function call stack at the time? In windows you should be able to see and inspect the cal stack, which will show where pxQueue was passed as an invalid value - maybe there was an error code that was ignored.
At what point in the process did this happen? Boot up? When starting to receive an OTA? Or some other time?
It happens just after the OTA Agent makes the first Publish. It does not happen if otaconfigLOG2_FILE_BLOCK_SIZE is 11 or 10, it happens when it is 9. A block size of 512 should be a valid size right?
The attachment shows the call stack, not sure what I’m looking for there.
You can click in the debugger to go up the call stack and try observing the value of
pxQueue to find out how it’s being passed as an invalid value to that function. I would suggest placing breakpoints wherever that variable is changed, and comparing the values in the cases where the block size is 10 versus when it is 9.
It’s possible that variable was meant to be set but was left uninitialized due to an error code path that didn’t result in execution halting. If you find where it’s supposed to be set in the working case, you could examine the surrounding code to find out why it’s not being set in this case.