Can not attach elf file to M7 core when Norflash Booted in S32G Golden VIP RDB

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

Can not attach elf file to M7 core when Norflash Booted in S32G Golden VIP RDB

ソリューションへジャンプ
1,467件の閲覧回数
tonyxuyq
Contributor I

Hi, teams:

I deployed the FreeRTOS_Toggle_Led_Example_S32G274A_M7 example to Norflash and booted normally (LED Toggles Normally). But I can not attach elf file to M7_0 Core use default attach script.

Error Log is attached.

 

ラベル(1)
0 件の賞賛
1 解決策
1,412件の閲覧回数
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

When attaching to a running code, you should un-check the "Load Image" option and set the "Set program counter at" to "Reset_Handler". This is mentioned in the HOWTO guide under the following address:

"C:/nxp/S32DS.3.4/S32DS/help/resources/howto/gdev/HOWTO_JTAG_flash_programming_with_S32_Debugger_and_S32_Debug_Probe_for_S32G274A_EVB.pdf"

You should not need to modify the scripts, but if modifying gives you the service you want, then good to know it works for you specific needs.

Please, let us know if this information was helpful or not.

元の投稿で解決策を見る

0 件の賞賛
5 返答(返信)
1,457件の閲覧回数
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Do you change the boot mode to be "Serial Boot"? To change modes, you can follow the explanation given in the User guide for the RDB [Page 9, Figure 3.6, S32G-VNP-RDB2 User Guide, Rev. 0, 03/2021]

For our understanding, you are trying to load to SRAM a project while the board is in RCON boot, which is not possible.

Please, let us know if this information is helpful or not.

0 件の賞賛
1,451件の閲覧回数
tonyxuyq
Contributor I

Hi, Daniel.

Thanks a lot. 

I was following Getting_started_with_S32G_S32DS(REV MAY 26 2021 MD) to Load a project to Sram from Norflash. And the loading process is succeed for me because the LED is togging as I wanted when Booted from Norflash. But I can not attach my elf file to debug this project with S32 debugger probe(following the instruction in page 78 of the getting_started document I mentioned earlier). The initial script I used to attach file is s32g2xx_attach.py

But If I download my project to SRAM with S32debugger with script s32g2xx_generic_bareboard.py   first and then attach my elf file with s32g2xx_attach.py, The attach process is successful. So I am wondering maybe  s32g2xx_attach.py missing some configurations for JTAG.

My project is attached in this reply, hope it is helpful for you to investigate this problem. Thanks a lot.

0 件の賞賛
1,428件の閲覧回数
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

There is a guide (or HOWTO, as defined by S32DS) in which it describes the steps to follow in order to debug a program that is loaded to the device. This can be found in:

"C:/nxp/S32DS.3.4/S32DS/help/resources/howto/gdev/HOWTO_JTAG_flash_programming_with_S32_Debugger_and_S32_Debug_Probe_for_S32G274A_EVB.pdf"

They are using the "s32g2xx_attach.py" script you are trying to use, but there are some steps prior to start debugging. This is explained in the guide above.

If still this is not useful, have you tried debugging using the default configuration for the example? Personally, it has less steps and easier to implement.

- You click on the arrow pointing down on the debug icon while on the main.c of the project then go to the "Debug Configurations..." option.

- This will open a window, on the left section you will see a vertical rectangle with options in it.

- Select the option under the "S32 Debugger" configuration (should have the name like the project you want to debug and adds the Debug_RAM words to it).

- By clicking the option, it will redirect the right window to the selected option. In this window, select the "Debugger" tab.

- In the "Debugger" tab will be a section where it will let you connect to your S32 debug probe. By configuring correctly to connect to your probe, you then apply the changes (if there is any to apply) and then click the debug button on the bottom of the window.

This should let you start debugging a program.

Please, let us know if this information was helpful or not.

0 件の賞賛
1,416件の閲覧回数
tonyxuyq
Contributor I

Hi,

I modified the initial script s32g2xx_attach.py. And now I can attach my elf file to the project.

But I must load the script 2 times. At the second time, attach process is ok.

So is there some JTAG settings must be done in my project's initial code? Otherwise I have to do these settings in script file.

0 件の賞賛
1,413件の閲覧回数
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

When attaching to a running code, you should un-check the "Load Image" option and set the "Set program counter at" to "Reset_Handler". This is mentioned in the HOWTO guide under the following address:

"C:/nxp/S32DS.3.4/S32DS/help/resources/howto/gdev/HOWTO_JTAG_flash_programming_with_S32_Debugger_and_S32_Debug_Probe_for_S32G274A_EVB.pdf"

You should not need to modify the scripts, but if modifying gives you the service you want, then good to know it works for you specific needs.

Please, let us know if this information was helpful or not.

0 件の賞賛