crt_emu_cm_redlink segfault when flashing to mimxrt1050-evk

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

crt_emu_cm_redlink segfault when flashing to mimxrt1050-evk

774 Views
dabortol
Contributor II

Hi everyone,

I get consistent segmentation faults on crt_emu_cm_redlink when trying to flash binaries to my mimxrt1050-evk board.

The issue seems to be related to the size of the binaries (or of the sections?) : the smaller they are the most likely I run into the segfault.

Host OS: Ubuntu 21.04/20.04
Toolchain: gcc version 9.3.1 20200408 (release) (GNU Arm Embedded Toolchain 9-2020-q2-update)
MCUXpresso IDE v11.4.1 [Build 6260] (*same error occurred with older versions as well)

 

 

 

Ns: MCUXpresso IDE RedlinkMulti Driver v11.4 (Sep 13 2021 15:09:55 - crt_emu_cm_redlink build 16)
Pc: (  0) Reading remote configuration
Wc(03). No cache support.
Nc: Found chip XML file in /path/to/MIMXRT1052xxxxB.xml
Pc: (  5) Remote configuration complete
Nc: Reconnected to existing LinkServer process.
Wc: ============= SCRIPT: RT1050_connect.scp =============
Wc: RT1050 Connect Script
Wc: DpID = 0BD11477
Wc: APID = 0x04770041
Wc: Disabling MPU
Wc: Configure FlexRAM for 256KB OC RAM, 128KB I-TCM, 128KB D-TCM
Wc: Finished
Wc: ============= END SCRIPT =============================
Nc: Probe Firmware: DAPLink CMSIS-DAP (ARM)
Nc: Serial Number:  0227000047784e4500299003d917004ce561000097969900
Nc: VID:PID:  0D28:0204
Nc: USB Path: /dev/hidraw5
Nc: Using memory from core 0 after searching for a good core
Pc: ( 30) Emulator Connected
Pc: ( 40) Debug Halt
Pc: ( 50) CPU ID
Nc: debug interface type      = CoreSight DP (DAP DP ID 0BD11477) 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
Nc: Probe(0): Connected&Reset. DpID: 0BD11477. CpuID: 00000C27. Info: <None>
Nc: Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Ns: Content of CoreSight Debug ROM(s):
Nc: RBASE E00FD000: CID B105100D PID 000008E88C ROM (type 0x1)
Nc: ROM 1 E00FE000: CID B105100D PID 04000BB4C8 ROM (type 0x1)
Nc: ROM 2 E00FF000: CID B105100D PID 04000BB4C7 ROM (type 0x1)
Nc: ROM 3 E000E000: CID B105E00D PID 04000BB00C Gen SCS (type 0x0)
Nc: ROM 3 E0001000: CID B105E00D PID 04000BB002 Gen DWT (type 0x0)
Nc: ROM 3 E0002000: CID B105E00D PID 04000BB00E Gen (type 0x0)
Nc: ROM 3 E0000000: CID B105E00D PID 04000BB001 Gen ITM (type 0x0)
Nc: ROM 2 E0041000: CID B105900D PID 04001BB975 CSt ARM ETMv4.0 type 0x13 Trace Source - Core
Nc: ROM 2 E0042000: CID B105900D PID 04004BB906 CSt type 0x14 Debug Control - Trigger, e.g. ECT
Nc: ROM 1 E0040000: CID B105900D PID 04000BB9A9 CSt type 0x11 Trace Sink - TPIU
Nc: ROM 1 E0043000: CID B105F00D PID 04001BB101 Sys (type 0x0)
Nc: NXP: MIMXRT1052xxxxB
Nc: DAP stride is 1024 bytes (256 words)
Nc: Inspected v.2 External Flash Device on SPI using SFDP JEDEC ID MIMXRT1050_SFDP_HYPERFLASH.cfx
Nc: Image 'iMXRT1050_SFDP_HYPERFLASH Sep 14 2021 15:09:44'
Nc: Opening flash driver MIMXRT1050_SFDP_HYPERFLASH.cfx
Nc: Sending VECTRESET to run flash driver
Nc: Flash variant 'JEDEC_SFDP_Device' detected (64MB = 256*256K at 0x60000000)
Nc: Closing flash driver MIMXRT1050_SFDP_HYPERFLASH.cfx
Pc: ( 65) Chip Setup Complete
Pc: ( 70) License Check Complete
Nt: Loading 'minimal.elf' ELF 0x60000000 len 0x200
Nc: Opening flash driver MIMXRT1050_SFDP_HYPERFLASH.cfx (already resident)
Nc: Sending VECTRESET to run flash driver
Nc: Flash variant 'JEDEC_SFDP_Device' detected (64MB = 256*256K at 0x60000000)
Pb: 1 of 1 (  0) Writing sectors 0-0 at 0x60000000 with 512 bytes
Ps: (  0) at 60000000: 0 bytes - 0/512
Segmentation fault (core dumped)

 

 

 


When running the flashing command through gdb, I get:

 

 

 

 Program received signal SIGSEGV, Segmentation fault.
__memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:269

 

 

Here are the sections' size from a binary that leads to segfault:

 

 

text   data bss    dec    hex 
109964 200  562376 672540 a431c

 

 

Any help would be appreciated

0 Kudos
1 Reply

739 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
I think I need more information about the issue, so I was wondering if you can demonstrate the steps of replicating the issue, it can help me to figure it out.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos