Flashing binary file to RT595 using Jlink segger

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

Flashing binary file to RT595 using Jlink segger

922件の閲覧回数
surabhi_sk30
Contributor I

Need to flash the binary file through command line on RT595 board using JLINK Segger.
can you please suggest the commands to flash the file through Jlink commander and execute the main function.

Have tried the commands mentioned in segger wiki:

1. Loadfile <filename>

2. r (to reset) 

3. g

not sure the main function is triggered or can you please mention how to check pc is hit the main function.
And unable to get log prints in RTT viewer.  

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

755件の閲覧回数
surabhi_sk30
Contributor I

Hi

Have flashed the binary, set the breakpoint at main and on console able to see break point is set at particular PC value and for execution have used Go command(if it is wrong command can you please provide commands need to use for normal execution and for step by step execution with break point ) but not sure it is hitting that break point or not, because am unable to see any halt at specific pc value.

 

so can you please explain me in detail how to debug through JLINK commander.

and please provide the commands need to trigger and where to check it is properly executing or not.

jlink_1.PNG

Regards,

Surabhi.

 

0 件の賞賛

734件の閲覧回数
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @surabhi_sk30 ,

I am glad to hear your good news!

After setting breakpoint and run the code, you can use the command H to halt CPU. Then you can compare the current PC pointer with the breakpoint you set.

Best regard,
Gavin 

0 件の賞賛

688件の閲覧回数
surabhi_sk30
Contributor I

Hi

I am able to see that PC pointer value and the break point value are same through the binary generated by IDE.

But the binary file which is generated by our framework, the values for PC and break point which I have given are different, the main function is not getting hit.

The PC value contains 0001C04A when I provide breakpoint at address on main(0x00008034)

can you please suggest how to debug on that.

Regards

Surabhi.

    

0 件の賞賛

627件の閲覧回数
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @surabhi_sk30 ,

Thanks for your feedback and the good news sharing.

So far, the image generated using the IDE is working fine, that is consistent with the test results on my side. More information may be needed about the issue of the image not working when generated using your own framework.

We want to be able to focus on one issue per thread as much as possible. So, regarding the new issue could you please resubmit a ticket? Thank you for your understanding.

Best regards,
Gavin

0 件の賞賛

605件の閲覧回数
surabhi_sk30
Contributor I

Hi @Gavin
Okay Thank you.
Can you please tell me where I can get linker file for RT595.

 

Regards,

Surabhi

0 件の賞賛

578件の閲覧回数
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @surabhi_sk30 ,

Yes, this linker file located at this path showing in the pic below. We need to build the code first, and it will appear in this location after the project is built.

Gavin_Jia_0-1712828319524.png

 

Best regards,
Gavin

0 件の賞賛

801件の閲覧回数
surabhi_sk30
Contributor I

okay will check with this, thank you.

 

Regards

Surabhi  

0 件の賞賛

878件の閲覧回数
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @surabhi_sk30 ,

Thanks for contacting NXP tech support!

1. Regarding how to use JLink Commander, if you are not familiar with it, we recommend you to operate it once with MCUXpressoIDE and then read the script file it generates.

Gavin_Jia_0-1711435362899.png

 

Gavin_Jia_1-1711435445271.png

 

2. About how to see if you're in main:

Gavin_Jia_2-1711437050128.png

You can look at the Image information through MCUXpressoIDE to get the run address of the main function, and then, in JLink Commander, put a breakpoint here.

3. About how to use RTT

At present, NXP official does not provide sample projects after porting RTT driver, may need to be transplanted by the customer to be able to use. There are a couple of web-based materials that you can refer to here:

https://mcuoneclipse.com/2015/07/07/using-segger-real-time-terminal-rtt-with-eclipse/
https://www.nxpic.org.cn/module/forum/forum.php?mod=viewthread&tid=615390&extra=page%3D&page=1&imx=&...

Hope it helps!

 

Best regards,
Gavin

0 件の賞賛

856件の閲覧回数
surabhi_sk30
Contributor I

Hi Gavin

Thanks for the information but,

Our requirement is to flash the binary through Jlink commander command line not from IDE,  so can you please suggest on this.

need info on how to execute application, set PC, through command line from Jlink segger.

 

Regards

Surabhi.                                                                                                                                                                                                                                                                                                                                                                                                           

0 件の賞賛

853件の閲覧回数
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @surabhi_sk30 ,

Yes, I understand your point. The reason for pointing out how the IDE operates is because it is possible to visualize here every command used by JLink Commander at the time of flash image. We can use them through JLink Commander. The picture I attached is how it works with JLink Commander.

For a detailed list of exactly how to set up commands such as the PC pointer, Segger provides this: https://wiki.segger.com/J-Link_Commander

Gavin_Jia_0-1711697140861.png

Best regards,
Gavin

0 件の賞賛