LPC1769 Second element of array, in Struct, overwritten

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1769 Second element of array, in Struct, overwritten

378 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by joeltong on Sun Mar 16 08:15:59 MST 2014
Hello,

I am trying to create a state manager, which contains an array of states.

I have tried running my code in standard Linux GCC, and it works.

On the LPC1769, when I have added a new state (at the second element of the array) using a helper function, it works fine.  Upon exit of helper function however, the first element is valid, while the second element gives some other unknown memory location.

This is the array within the struct:

volatile State_t * states[MAX_STATES];


Any idea?
Labels (1)
0 Kudos
1 Reply

360 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Sun Mar 16 12:00:54 MST 2014
Show use some of your code.
0 Kudos