Bootloader, Application, Structures and deep pointer

Bootloader: C:0x0000 - C:0x7FFF
Manages CAN-Communication and in-field update.
Application C:0x8000 - C:0xEFFF
Applications is controlled with bootloader over CAN 2.0.

Compiled both seperatly and merge the Hex-file. Interrupts and function calls work.

At level of 8 successive funtions calls the acces to an struct in Applications XDATA mem is incorrect. The expected pointer is not given.

Any adwise?

Parents
  • At level of 8 successive funtions calls the acces to an struct in Applications XDATA mem is incorrect.

    A few questions:

    * What is meant by "successive" ? Is the function called eight times in a row, or does it mean the eighth depth level of the call tree ?

    * Are the function's arguments passed on the stack (i.e. is the function declared reentrant) ? If yes, check for a stack overflow.

    * Are you using function pointers or any other constructs that might make it necessary to manually adjust the call tree ?

    * Does the function work correctly when called from a lower depth ?

Reply
  • At level of 8 successive funtions calls the acces to an struct in Applications XDATA mem is incorrect.

    A few questions:

    * What is meant by "successive" ? Is the function called eight times in a row, or does it mean the eighth depth level of the call tree ?

    * Are the function's arguments passed on the stack (i.e. is the function declared reentrant) ? If yes, check for a stack overflow.

    * Are you using function pointers or any other constructs that might make it necessary to manually adjust the call tree ?

    * Does the function work correctly when called from a lower depth ?

Children
More questions in this forum