LPC1769 Second element of array, in Struct, overwritten

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC1769 Second element of array, in Struct, overwritten

793件の閲覧回数
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?
ラベル(1)
0 件の賞賛
返信
1 返信

775件の閲覧回数
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 件の賞賛
返信