PEMicro - debugging thread lost when i try to see RAM - MCUXpresso

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

PEMicro - debugging thread lost when i try to see RAM - MCUXpresso

2,218件の閲覧回数
demian91
Contributor III

Hello everyone

I'm having a lot of trouble debugging correctly, in my case LPC54616, because when I set a breakpoint and go step by step and then hover the mouse over a global structure, I immediately see that the content is inconsistent and after having done so, when perform one more step, I lose the connection with the microcontroller and it seems to stop executing instructions. I'm not sure if it's because the structure could be too big or something like that, but if I don't look at any variables and run the program, it works normally.
Why does this happen? Is there any debug configuration that can help me?

0 件の賞賛
返信
6 返答(返信)

2,179件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @demian91 

How about testing with a simple project?

If still has issue, please take a video show your detail steps, and send your project.

 

BR

Alice

0 件の賞賛
返信

2,166件の閲覧回数
demian91
Contributor III

I have created a LPC54616J512BD100 project with the Semihost option but the rest of the options are the default ones.
If instead of adding the structure expression I place the mouse over it, it produces the same result as I do at the end in the video, only it cannot be seen in the recording.

0 件の賞賛
返信

2,039件の閲覧回数
juan_see
Contributor III

Hi @demian91 ,

Your test structure contains uninitialized pointers. Please initialize your test.p_map and test.p_map->p_sector pointers before viewing the test structure in the expressions window.

This also fails with CMSIS_DAP when viewing the test.p_map->p_sector pointer in the expressions window. 

0 件の賞賛
返信

2,011件の閲覧回数
demian91
Contributor III

In my main project I have many structures and where I have members of type pointers to structures, I mostly do the initialization when I reserve dynamic memory but I don't always do it. Is there no alternative to this type of problem for the pemicro programmer? because I am stuck with this problem.

0 件の賞賛
返信

2,009件の閲覧回数
juan_see
Contributor III

The reason why it is resetting is because the uninitialized pointer can point to an invalid memory location. When you put the uninitialized pointer into the expressions view, a read to to the invalid memory location causes the part to reset. 

My suggestion is to initialize the pointers to a known good value. It is best programming practice. 

0 件の賞賛
返信

2,081件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @demian91 

I think this is related to PE debugger, I tested with CMSIS-DAP debug probe refer to your video steps, there is no issue, please see my attachment video.

Recommend you using CMSIS-DAP or J-LINK debug probe.

 

BR

Alice