crt_emu_cm_redlink.exe via C# as process

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

crt_emu_cm_redlink.exe via C# as process

1,311 Views
Ralf_Rademacher
Contributor III

hi there,

according to the following links i tried to automate my burning process.

https://community.nxp.com/t5/MCUXpresso-IDE/How-to-make-redlinkserv-work-in-the-command-line/m-p/120...

https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Using-the-GUI-flash-programming-tool/m-p/474417

https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/What-is-Redlink/m-p/475446

https://community.nxp.com/t5/MCUXpresso-IDE/How-to-make-redlinkserv-work-in-the-command-line/m-p/120...

 

so i use crt_emu_cm_redlink.exe with the following arguments: (c#)

 

"--flash-load-exec " + prog.GetImageFile() + " -p LPC55S16 --bootromstall 0x50000040 --probeserial " + prog.GetSerial() + " -CoreIndex=0 --flash-driver= -x prog.GetFlashDriverPath() --flash-dir prog.GetFlashPath1() --flash-dir prog.GetFlashPath2() --flash-hashing --vendor NXP ";

 

this results in the following output:

 

Ns: MCUXpresso IDE RedlinkMulti Driver v11.4 (Sep 13 2021 15:04:52 - crt_emu_cm_redlink.exe build 16)
Wc(03). No cache support.
Nc: Found chip XML file in ..replaced..manual..for..community..forum..\LPC55S16.xml
Nc: Restarted LinkServer process (PID 1136).
Nc: Probe Firmware: LPC-LINK2 CMSIS-DAP V5.361 NB (NXP Semiconductors)
Nc: Serial Number:  FTCQL0OU
Nc: VID:PID:  1FC9:0090
Nc: USB Path: \\?\hid#vid_1fc9&pid_0090#8&209942ad&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
Nc: Using memory from core 0 after searching for a good core
Pc: ( 30) Emulator Connected
Nc: processor is in secure mode
Pc: ( 40) Debug Halt
Pc: ( 50) CPU ID
Nc: debug interface type      = <unknown> (DAP DP ID 6BA02477) over <unset_wire_type> TAP 0
Nc: processor type            = Cortex-M33 (CPU ID 00000D21) on DAP AP 0
Nc: number of h/w breakpoints = 8
Nc: number of flash patches   = 0
Nc: number of h/w watchpoints = 4
Nc: Probe(0): Connected&Reset. DpID: 6BA02477. CpuID: 00000D21. Info: <None>
Nc: Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Ns: Content of CoreSight Debug ROM(s):
Nc: RBASE E00FE000: CID B105100D PID 0000095000 ROM (type 0x1)
Nc: ROM 1 E00FF000: CID B105100D PID 04000BB4C9 ROM (type 0x1)
Nc: ROM 2 E000E000: CID B105900D PID 04000BBD21 CSt ARM ARMv8-M type 0x0 Misc - Undefined
Nc: ROM 2 E0001000: CID B105900D PID 04000BBD21 CSt ARM DWTv2 type 0x0 Misc - Undefined
Nc: ROM 2 E0002000: CID B105900D PID 04000BBD21 CSt ARM FPBv2 type 0x0 Misc - Undefined
Nc: ROM 2 E0000000: CID B105900D PID 04000BBD21 CSt ARM ITMv2 type 0x43 Trace Source - Bus
Nc: ROM 1 E0040000: CID B105900D PID 04000BBD21 CSt type 0x11 Trace Sink - TPIU
Nc: NXP: LPC55S16
Nc: DAP stride is 1024 bytes (256 words)
Nc: Inspected v.2 On chip Flash memory using IAP lib LPC551x.cfx
Nc: Image 'LPC551x Sep 14 2021 15:06:42'
Nc: Opening flash driver LPC551x.cfx
Nc: Sending VECTRESET to run flash driver
Nc: Flash variant 'LPC551x (244KB)' detected (244KB = 488*512 at 0x0)
Nc: Closing flash driver LPC551x.cfx
Nt: Loading 'INC5502_INTF_LPC55S16.axf' ELF 0x00000000 len 0x15980
Nc: Opening flash driver LPC551x.cfx (already resident)
Nc: Sending VECTRESET to run flash driver
Nc: Flash variant 'LPC551x (244KB)' detected (244KB = 488*512 at 0x0)
Nc: Sectors written: 6, unchanged: 167, total: 173
Nc: Closing flash driver LPC551x.cfx
Nt: Loaded 0x15980 bytes in 334ms (about 264kB/s)
Nt: Reset target (romstall)
Nc: Starting execution using system reset with a stall address
Nc: Retask read watchpoint 1 at 0x50000040 to use for boot ROM stall

 

 the first question to this output is: (C# variant)

 

Nc: debug interface type      = <unknown> (DAP DP ID 6BA02477) over <unset_wire_type> TAP 0

 

why there is this <unknown> and <unset_wire_type> mark? compared to the batch-script variant, where i get the following output:

 

Nc: debug interface type      = CoreSight DP (DAP DP ID 6BA02477) over SWD TAP 0

 

it is related to the preconnectScript?

 

 

last question for now:

if i use parameters -g and --debug 2, often a timeout during flash writing occurs in my process. and this problem occurs not, when i use the batch-scriptvariant. what i'm doing wrong?

 

best

Ralf

0 Kudos
3 Replies

1,268 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @ lpcxpresso_supp 

 

Could you help to give some points, thanks!

 

BR

Alice

0 Kudos

1,236 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Section 14.1.1 of the User Guide describes how to obtain the appropriate command line for using the Flash tool.

Strictly speaking about the described behavior, I suspect the problems are caused by the missing execution of the preconnect script (SWD protocol is specified there). If flash programming and debugging works from within the IDE, I suggest invoking the command line tools with the exact same arguments as the IDE does.

Regards,

MCUXpresso IDE Support

1,248 Views
Ralf_Rademacher
Contributor III

@Alice_Yang,

sorry for my temporary reply on your last message. i have overseen that it was not for me.

0 Kudos