LinkServer problems when debugging

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

LinkServer problems when debugging

805 Views
tbonkers
Contributor III

I can upload and erase flash using a custom LinkServer algorithm, however I cannot debug. Starting gdbserver works, however when trying to connect I get a myriad of errors:

INFO: [stub (3333)] Pb: (100) Finished writing Flash successfully.
INFO: [stub (3333)] Wc: ============= SCRIPT: RT1160_reset_M7.scp =============
Wc: This probe = 1
Wc: This TAP = 0
Wc: This core = 0
Wc: SYSTEM Reset
Wc: Wirespeed = 10000000 Hz
Wc: Error: Wire Ack Fault - target connected?
Wc: DpID = 6BA02477
INFO: [stub (3333)] Wc: TAP 0: 6BA02477 Core 0: M7  APID: 84770001 ROM Table: E00FD003*
Wc: TAP 0: 6BA02477 AP   1:     APID: 24770011 ROM Table: E00FF003
Wc: TAP 0: 6BA02477 AP   2:     APID: 54770002 ROM Table: 00000002
Wc: APID = 0x84770001
Wc: View cores on the DAP AP
Wc: TAP 0: 6BA02477 Core 0: M7  APID: 84770001 ROM Table: E00FD003*
Wc: R15 = 0x00223104
Wc: Vector table SP/PC is the reset context.
Wc: PC = 0x3000EF1D
Wc: SP = 0x8021C450
Wc: XPSR = 0x01000000
Wc: VTOR = 0x30002000
Wc: Set DEMCR = 0x010007F1
Wc: ============= END SCRIPT ==============================
INFO: [stub (3333)] Nc: Using memory from core 0 after searching for a good core
INFO: [stub (3333)] Pc: ( 30) Emulator Connected
INFO: [stub (3333)] Pc: ( 40) Debug Halt
INFO: [stub (3333)] Pc: ( 50) CPU ID
INFO: [stub (3333)] Nc: debug interface type      = CoreSight DP (DAP DP ID 6BA02477) over SWD TAP 0
Nc: processor type            = Cortex-M7 (CPU ID 00000C27) on DAP AP 0
Nc: number of h/w breakpoints = 8
Nc: number of flash patches   = 0
Nc: number of h/w watchpoints = 4
INFO: [stub (3333)] Wc: ============= SCRIPT: RT1160_reset_M7.scp =============
Wc: This probe = 1
Wc: This TAP = 0
Wc: This core = 0
Wc: SYSTEM Reset
Wc: Wirespeed = 10000000 Hz
Wc: DpID = 6BA02477
Wc: TAP 0: 6BA02477 Core 0: M7  APID: 84770001 ROM Table: E00FD003*
Wc: TAP 0: 6BA02477 AP   1:     APID: 24770011 ROM Table: E00FF003
Wc: TAP 0: 6BA02477 AP   2:     APID: 54770002 ROM Table: 00000002
Wc: APID = 0x84770001
INFO: [stub (3333)] Wc: View cores on the DAP AP
Wc: TAP 0: 6BA02477 Core 0: M7  APID: 84770001 ROM Table: E00FD003*
Wc: R15 = 0x00223104
Wc: Vector table SP/PC is the reset context.
Wc: PC = 0xFFFFFFFF
Wc: SP = 0xFFFFFFFF
Wc: XPSR = 0x01000000
Wc: VTOR = 0x30002000
Wc: Set DEMCR = 0x010007F1
Wc: ============= END SCRIPT ==============================
INFO: [stub (3333)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
INFO: [stub (3333)] Xw:
INFO: [stub (3333)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
INFO: [stub (3333)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
INFO: [stub (3333)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
INFO: [stub (3333)] Nc: state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access

The second reset script invocation seems to be where the problem occurs. Strangely enough, when I start LinkServer gdbserver with --attach option, I can connect with the debugger.

The issue might have something to do with the FlexSPI control block - when I'm using Octal DDR mode, I can connect and debug; when I'm using XSPI I can't.

0 Kudos
Reply
4 Replies

769 Views
tbonkers
Contributor III
I believe the problem might stem from the .cfx driver applying the wrong configuration option to the FlexSPI. I'm using IS25WX256 in Extended SPI mode. The LinkServer flash driver applies CONFIG_OPTION1 0xC0603001.

I tried using different CONFIG_OPTION1 in the flash driver (0xC0000001), but the problem with debug not working persists. When using MCUXpresso Secure Provisioning Tool, I can read/write flash using config option 0xC0000001.

Is there a way to get the currently applied config option from the FlexSPI ROM API?
0 Kudos
Reply

705 Views
carlos_o
NXP TechSupport
NXP TechSupport

Hi @tbonkers 

Thanks for your post.

Could you please provide the chip you are using?

Is it a custom board? if not please provide which one you are using.

Could you please provide the reason why you need to use a custom script to use LinkServer?

 

0 Kudos
Reply

686 Views
tbonkers
Contributor III
Hi,
I am using a custom board with MIMXRT1166CVM5A and octal flash IS25WX256.
I've had to use a custom algorithm for LinkServer as the reset pin of the flash does not match the reset pin used by MIMXRT1160-EVK.
0 Kudos
Reply

668 Views
carlos_o
NXP TechSupport
NXP TechSupport

Hi @tbonkers 

This are some guide or information related to scripting with LinkServer

Solved: LinkServer automation with python - NXP Community

LinkServer Scripting, and how to Recover MCUs with a Script | MCU on Eclipse

I also recommend you review the script provided with the LinkServer at yourlinkserverlocation/binaries/scripts/

BR

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2179961%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELinkServer%20problems%20when%20debugging%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2179961%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20can%20upload%20and%20erase%20flash%20using%20a%20custom%20LinkServer%20algorithm%2C%20however%20I%20cannot%20debug.%20Starting%20gdbserver%20works%2C%20however%20when%20trying%20to%20connect%20I%20get%20a%20myriad%20of%20errors%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EINFO%3A%20%5Bstub%20(3333)%5D%20Pb%3A%20(100)%20Finished%20writing%20Flash%20successfully.%0AINFO%3A%20%5Bstub%20(3333)%5D%20Wc%3A%20%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%20SCRIPT%3A%20RT1160_reset_M7.scp%20%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0AWc%3A%20This%20probe%20%3D%201%0AWc%3A%20This%20TAP%20%3D%200%0AWc%3A%20This%20core%20%3D%200%0AWc%3A%20SYSTEM%20Reset%0AWc%3A%20Wirespeed%20%3D%2010000000%20Hz%0AWc%3A%20Error%3A%20Wire%20Ack%20Fault%20-%20target%20connected%3F%0AWc%3A%20DpID%20%3D%206BA02477%0AINFO%3A%20%5Bstub%20(3333)%5D%20Wc%3A%20TAP%200%3A%206BA02477%20Core%200%3A%20M7%20%20APID%3A%2084770001%20ROM%20Table%3A%20E00FD003*%0AWc%3A%20TAP%200%3A%206BA02477%20AP%20%20%201%3A%20%20%20%20%20APID%3A%2024770011%20ROM%20Table%3A%20E00FF003%0AWc%3A%20TAP%200%3A%206BA02477%20AP%20%20%202%3A%20%20%20%20%20APID%3A%2054770002%20ROM%20Table%3A%2000000002%0AWc%3A%20APID%20%3D%200x84770001%0AWc%3A%20View%20cores%20on%20the%20DAP%20AP%0AWc%3A%20TAP%200%3A%206BA02477%20Core%200%3A%20M7%20%20APID%3A%2084770001%20ROM%20Table%3A%20E00FD003*%0AWc%3A%20R15%20%3D%200x00223104%0AWc%3A%20Vector%20table%20SP%2FPC%20is%20the%20reset%20context.%0AWc%3A%20PC%20%3D%200x3000EF1D%0AWc%3A%20SP%20%3D%200x8021C450%0AWc%3A%20XPSR%20%3D%200x01000000%0AWc%3A%20VTOR%20%3D%200x30002000%0AWc%3A%20Set%20DEMCR%20%3D%200x010007F1%0AWc%3A%20%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%20END%20SCRIPT%20%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0AINFO%3A%20%5Bstub%20(3333)%5D%20Nc%3A%20Using%20memory%20from%20core%200%20after%20searching%20for%20a%20good%20core%0AINFO%3A%20%5Bstub%20(3333)%5D%20Pc%3A%20(%2030)%20Emulator%20Connected%0AINFO%3A%20%5Bstub%20(3333)%5D%20Pc%3A%20(%2040)%20Debug%20Halt%0AINFO%3A%20%5Bstub%20(3333)%5D%20Pc%3A%20(%2050)%20CPU%20ID%0AINFO%3A%20%5Bstub%20(3333)%5D%20Nc%3A%20debug%20interface%20type%20%20%20%20%20%20%3D%20CoreSight%20DP%20(DAP%20DP%20ID%206BA02477)%20over%20SWD%20TAP%200%0ANc%3A%20processor%20type%20%20%20%20%20%20%20%20%20%20%20%20%3D%20Cortex-M7%20(CPU%20ID%2000000C27)%20on%20DAP%20AP%200%0ANc%3A%20number%20of%20h%2Fw%20breakpoints%20%3D%208%0ANc%3A%20number%20of%20flash%20patches%20%20%20%3D%200%0ANc%3A%20number%20of%20h%2Fw%20watchpoints%20%3D%204%0AINFO%3A%20%5Bstub%20(3333)%5D%20Wc%3A%20%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%20SCRIPT%3A%20RT1160_reset_M7.scp%20%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0AWc%3A%20This%20probe%20%3D%201%0AWc%3A%20This%20TAP%20%3D%200%0AWc%3A%20This%20core%20%3D%200%0AWc%3A%20SYSTEM%20Reset%0AWc%3A%20Wirespeed%20%3D%2010000000%20Hz%0AWc%3A%20DpID%20%3D%206BA02477%0AWc%3A%20TAP%200%3A%206BA02477%20Core%200%3A%20M7%20%20APID%3A%2084770001%20ROM%20Table%3A%20E00FD003*%0AWc%3A%20TAP%200%3A%206BA02477%20AP%20%20%201%3A%20%20%20%20%20APID%3A%2024770011%20ROM%20Table%3A%20E00FF003%0AWc%3A%20TAP%200%3A%206BA02477%20AP%20%20%202%3A%20%20%20%20%20APID%3A%2054770002%20ROM%20Table%3A%2000000002%0AWc%3A%20APID%20%3D%200x84770001%0AINFO%3A%20%5Bstub%20(3333)%5D%20Wc%3A%20View%20cores%20on%20the%20DAP%20AP%0AWc%3A%20TAP%200%3A%206BA02477%20Core%200%3A%20M7%20%20APID%3A%2084770001%20ROM%20Table%3A%20E00FD003*%0AWc%3A%20R15%20%3D%200x00223104%0AWc%3A%20Vector%20table%20SP%2FPC%20is%20the%20reset%20context.%0AWc%3A%20PC%20%3D%200xFFFFFFFF%0AWc%3A%20SP%20%3D%200xFFFFFFFF%0AWc%3A%20XPSR%20%3D%200x01000000%0AWc%3A%20VTOR%20%3D%200x30002000%0AWc%3A%20Set%20DEMCR%20%3D%200x010007F1%0AWc%3A%20%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%20END%20SCRIPT%20%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0AINFO%3A%20%5Bstub%20(3333)%5D%20Nc%3A%20state%20-%20running%20or%20following%20reset%20request%20-%20re-read%20of%20state%20failed%20-%20rc%20Nn(05).%20Wire%20ACK%20Fault%20in%20DAP%20access%0AINFO%3A%20%5Bstub%20(3333)%5D%20Xw%3A%0AINFO%3A%20%5Bstub%20(3333)%5D%20Nc%3A%20state%20-%20running%20or%20following%20reset%20request%20-%20re-read%20of%20state%20failed%20-%20rc%20Nn(05).%20Wire%20ACK%20Fault%20in%20DAP%20access%0AINFO%3A%20%5Bstub%20(3333)%5D%20Nc%3A%20state%20-%20running%20or%20following%20reset%20request%20-%20re-read%20of%20state%20failed%20-%20rc%20Nn(05).%20Wire%20ACK%20Fault%20in%20DAP%20access%0AINFO%3A%20%5Bstub%20(3333)%5D%20Nc%3A%20state%20-%20running%20or%20following%20reset%20request%20-%20re-read%20of%20state%20failed%20-%20rc%20Nn(05).%20Wire%20ACK%20Fault%20in%20DAP%20access%0AINFO%3A%20%5Bstub%20(3333)%5D%20Nc%3A%20state%20-%20running%20or%20following%20reset%20request%20-%20re-read%20of%20state%20failed%20-%20rc%20Nn(05).%20Wire%20ACK%20Fault%20in%20DAP%20access%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EThe%20second%20reset%20script%20invocation%20seems%20to%20be%20where%20the%20problem%20occurs.%20Strangely%20enough%2C%20when%20I%20start%20LinkServer%20gdbserver%20with%20--attach%20option%2C%20I%20can%20connect%20with%20the%20debugger.%3C%2FP%3E%3CP%3EThe%20issue%20might%20have%20something%20to%20do%20with%20the%20FlexSPI%20control%20block%20-%20when%20I'm%20using%20Octal%20DDR%20mode%2C%20I%20can%20connect%20and%20debug%3B%20when%20I'm%20using%20XSPI%20I%20can't.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2183251%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LinkServer%20problems%20when%20debugging%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2183251%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F183978%22%20target%3D%22_blank%22%3E%40tbonkers%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20are%20some%20guide%20or%20information%20related%20to%20scripting%20with%20LinkServer%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-teams%3D%22true%22%3E%3CA%20id%3D%22menur1jr%22%20class%3D%22fui-Link%20___1q1shib%20f2hkw1w%20f3rmtva%20f1ewtqcl%20fyind8e%20f1k6fduh%20f1w7gpdv%20fk6fouc%20fjoy568%20figsok6%20f1s184ao%20f1mk8lai%20fnbmjn9%20f1o700av%20f13mvf36%20f1cmlufx%20f9n3di6%20f1ids18y%20f1tx3yz7%20f1deo86v%20f1eh06m1%20f1iescvh%20fhgqx19%20f1olyrje%20f1p93eir%20f1nev41a%20f1h8hb77%20f1lqvz6u%20f10aw75t%20fsle3fq%20f17ae5zn%22%20title%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fmcuxpresso-general%2Flinkserver-automation-with-python%2Fm-p%2F2013327%22%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FMCUXpresso-General%2FLinkServer-automation-with-python%2Fm-p%2F2013327%22%20target%3D%22_blank%22%20aria-label%3D%22Link%20Solved%3A%20LinkServer%20automation%20with%20python%20-%20NXP%20Community%22%3ESolved%3A%20LinkServer%20automation%20with%20python%20-%20NXP%20Community%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-teams%3D%22true%22%3E%3CA%20id%3D%22menur1ju%22%20class%3D%22fui-Link%20___1q1shib%20f2hkw1w%20f3rmtva%20f1ewtqcl%20fyind8e%20f1k6fduh%20f1w7gpdv%20fk6fouc%20fjoy568%20figsok6%20f1s184ao%20f1mk8lai%20fnbmjn9%20f1o700av%20f13mvf36%20f1cmlufx%20f9n3di6%20f1ids18y%20f1tx3yz7%20f1deo86v%20f1eh06m1%20f1iescvh%20fhgqx19%20f1olyrje%20f1p93eir%20f1nev41a%20f1h8hb77%20f1lqvz6u%20f10aw75t%20fsle3fq%20f17ae5zn%22%20title%3D%22https%3A%2F%2Fmcuoneclipse.com%2F2023%2F07%2F25%2Flinkserver-scripting-and-how-to-recover-mcus-with-a-script%2F%22%20href%3D%22https%3A%2F%2Fmcuoneclipse.com%2F2023%2F07%2F25%2Flinkserver-scripting-and-how-to-recover-mcus-with-a-script%2F%22%20target%3D%22_blank%22%20rel%3D%22noreferrer%20noopener%20nofollow%22%20aria-label%3D%22Link%20LinkServer%20Scripting%2C%20and%20how%20to%20Recover%20MCUs%20with%20a%20Script%20%7C%20MCU%20on%20Eclipse%22%3ELinkServer%20Scripting%2C%20and%20how%20to%20Recover%20MCUs%20with%20a%20Script%20%7C%20MCU%20on%20Eclipse%3C%2FA%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-teams%3D%22true%22%3EI%20also%20recommend%20you%20review%20the%20script%20provided%20with%20the%20LinkServer%20at%20yourlinkserverlocation%2Fbinaries%2Fscripts%2F%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-teams%3D%22true%22%3EBR%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2181845%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LinkServer%20problems%20when%20debugging%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2181845%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHi%2C%3CBR%20%2F%3EI%20am%20using%20a%20custom%20board%20with%20MIMXRT1166CVM5A%20and%20octal%20flash%20IS25WX256.%3CBR%20%2F%3EI've%20had%20to%20use%20a%20custom%20algorithm%20for%20LinkServer%20as%20the%20reset%20pin%20of%20the%20flash%20does%20not%20match%20the%20reset%20pin%20used%20by%20MIMXRT1160-EVK.%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2181513%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LinkServer%20problems%20when%20debugging%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2181513%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F183978%22%20target%3D%22_blank%22%3E%40tbonkers%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20your%20post.%3C%2FP%3E%0A%3CP%3ECould%20you%20please%20provide%20the%20chip%20you%20are%20using%3F%3C%2FP%3E%0A%3CP%3EIs%20it%20a%20custom%20board%3F%20if%20not%20please%20provide%20which%20one%20you%20are%20using.%3C%2FP%3E%0A%3CP%3ECould%20you%20please%20provide%20the%20reason%20why%20you%20need%20to%20use%20a%20custom%20script%20to%20use%20LinkServer%3F%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2180199%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LinkServer%20problems%20when%20debugging%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2180199%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EI%20believe%20the%20problem%20might%20stem%20from%20the%20.cfx%20driver%20applying%20the%20wrong%20configuration%20option%20to%20the%20FlexSPI.%20I'm%20using%20IS25WX256%20in%20Extended%20SPI%20mode.%20The%20LinkServer%20flash%20driver%20applies%20CONFIG_OPTION1%200xC0603001.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20tried%20using%20different%20CONFIG_OPTION1%20in%20the%20flash%20driver%20(0xC0000001)%2C%20but%20the%20problem%20with%20debug%20not%20working%20persists.%20When%20using%20MCUXpresso%20Secure%20Provisioning%20Tool%2C%20I%20can%20read%2Fwrite%20flash%20using%20config%20option%200xC0000001.%3CBR%20%2F%3E%3CBR%20%2F%3EIs%20there%20a%20way%20to%20get%20the%20currently%20applied%20config%20option%20from%20the%20FlexSPI%20ROM%20API%3F%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E