MIMXRT1060-EVK flashing red light rapidly during debug

cancel
Showing results for 
Search instead for 
Did you mean: 

MIMXRT1060-EVK flashing red light rapidly during debug

1,191 Views
ahmed_mostafa
Contributor II

I'm running the example hello world example for the MIMXRT1060-EVK and it builds fine, but when i try to debug it, it stops at the first function inside main.c, which is BOARD_ConfigMPU(). It says there is a temporary breakpoint there. When i try to press the green arrow to resume the debug session and go through the rest of the code, the board flashes red LED very rapidly, and the green arrow disappears. It looks like the program just haults and doesn't continue. What am I doing wrong? I'm using mcuxpresso.

After a minute or so, I then get a message saying

pastedImage_10.png

and the light stops flashing. Even the red end debug square is grayed out now.

0 Kudos
9 Replies

1,005 Views
ahmed_mostafa
Contributor II

This is the output of the Debug messages:

MCUXpresso IDE RedlinkMulti Driver v11.1 (Feb 24 2020 13:54:38 - crt_emu_cm_redlink build 11)
Found chip XML file in C:/Users/amostafa9/Documents/MCUXpressoIDE_11.1.1_3241/workspace/evkmimxrt1060_mco_slave/evkmimxrt1060_hello_world/Debug\MIMXRT1062xxxxA.xml
Reconnected to existing LinkServer process.
============= SCRIPT: RT1060_connect.scp =============
RT1060 Connect Script
DpID = 0BD11477
APID = 0x04770041
Disabling MPU
Configure FlexRAM for 768KB OC RAM, 128KB I-TCM, 128KB D-TCM
Finished
============= END SCRIPT =============================
Probe Firmware: CMSIS-DAP (ARM)
Serial Number:  0229000005d8209e00000000000000000000000097969905
VID:PID:  0D28:0204
USB Path: \\?\hid#vid_0d28&pid_0204&mi_03#7&520acbb&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
Using memory from core 0 after searching for a good core
debug interface type      = Cortex-M7 (DAP DP ID 0BD11477) over SWD TAP 0
processor type            = Cortex-M7 (CPU ID 00000C27) on DAP AP 0
number of h/w breakpoints = 8
number of flash patches   = 0
number of h/w watchpoints = 4
Probe(0): Connected&Reset. DpID: 0BD11477. CpuID: 00000C27. Info: <None>
Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Content of CoreSight Debug ROM(s):
RBASE E00FD000: CID B105100D PID 000008E88C ROM (type 0x1)
ROM 1 E00FE000: CID B105100D PID 04000BB4C8 ROM (type 0x1)
ROM 2 E00FF000: CID B105100D PID 04000BB4C7 ROM (type 0x1)
ROM 3 E000E000: CID B105E00D PID 04000BB00C Gen SCS (type 0x0)
ROM 3 E0001000: CID B105E00D PID 04000BB002 Gen DWT (type 0x0)
ROM 3 E0002000: CID B105E00D PID 04000BB00E Gen (type 0x0)
ROM 3 E0000000: CID B105E00D PID 04000BB001 Gen ITM (type 0x0)
ROM 2 E0041000: CID B105900D PID 04001BB975 CSt ARM ETMv4.0 type 0x13 Trace Source - Core
ROM 2 E0042000: CID B105900D PID 04004BB906 CSt type 0x14 Debug Control - Trigger, e.g. ECT
ROM 1 E0040000: CID B105900D PID 04000BB9A9 CSt type 0x11 Trace Sink - TPIU
ROM 1 E0043000: CID B105F00D PID 04001BB101 Sys (type 0x0)
NXP: MIMXRT1062xxxxA
DAP stride is 1024 bytes (256 words)
Inspected v.2 External Flash Device on SPI using SFDP JEDEC ID MIMXRT1060_SFDP_QSPI.cfx
Image 'iMXRT1060_SFDP_QSPI Feb 17 2020 13:59:05'
Opening flash driver MIMXRT1060_SFDP_QSPI.cfx
Sending VECTRESET to run flash driver
Flash variant 'JEDEC_SFDP_Device' detected (8MB = 128*64K at 0x60000000)
Closing flash driver MIMXRT1060_SFDP_QSPI.cfx
Connected: was_reset=false. was_stopped=true
Awaiting telnet connection to port 3330 ...
GDB nonstop mode enabled
Opening flash driver MIMXRT1060_SFDP_QSPI.cfx (already resident)
Sending VECTRESET to run flash driver
Flash variant 'JEDEC_SFDP_Device' detected (8MB = 128*64K at 0x60000000)
Writing 26312 bytes to address 0x60000000 in Flash
Sectors written: 0, unchanged: 1, total: 1
Erased/Wrote sector  0-0 with 26312 bytes in 13msec
Closing flash driver MIMXRT1060_SFDP_QSPI.cfx
Flash Write Done
Flash Program Summary: 26312 bytes in 0.01 seconds (1976.56 KB/sec)
Starting execution using system reset and halt target
Stopped (Was Reset)  [Reset from Unknown]
Stopped: Breakpoint #1

0 Kudos

1,005 Views
ahmed_mostafa
Contributor II

lpcxpresso_support‌ Any help?

0 Kudos

1,005 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Hi,

The log looks ok. We tried to reproduce the problem with the same board / setup but in our case worked normally. Can you please try to change the MCU memory settings to use OC RAM instead BOARD SDRAM (Project settings-> C/C++ Build-> MCU Settings -> select OC RAM and press the "Up" button until OC RAM reaches the second position after Flash (instead of BOARD SDRAM) -> Rebuid-> Debug). We would like to check if the data corruption at runtime comes from the type of the RAM you are using.

Greetings,
MCUXpresso IDE Support

0 Kudos

1,005 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Also, the second test (if the above is still not working), revert the above modification and move the entire application to RAM (project settings -> C/C++ Build ->Settings->MCU Linker-> Managed Linker Script -> check "Link application to RAM" -> rebuild -> debug

Greetings,
MCUXpresso IDE Support

0 Kudos

1,005 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Hi,

Can you please provide few details:

- what MCUXpresso version do you use?

- can you send the gdb trace log?

- what debug probe do you use?

- can you send the debug probe log?

Greetings,
MCUXpresso IDE Support

0 Kudos

1,005 Views
ahmed_mostafa
Contributor II

Using:

-MCUXpresso IDE v11.1.1_3241

-Debug Probe: CMSIS-DAP

-

-Debugger Console:
GNU gdb (GNU Tools for Arm Embedded Processors 8-2019-q3-update) 8.3.0.20190703-git
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".

Program stopped.
LPUART_ReadBlocking (base=0x55b73ead, data=0xc3cfdfad <error: Cannot access memory at address 0xc3cfdfad>, length=2011143135) at ../drivers/fsl_lpuart.c:877
877            while (0U == ((base->WATER & LPUART_WATER_RXCOUNT_MASK) >> LPUART_WATER_RXCOUNT_SHIFT))

Temporary breakpoint 1, main () at ../source/hello_world.c:35
35        BOARD_ConfigMPU();

Looks like the program stops but I'm not sure why. I haven't made any chances to the code.

0 Kudos

1,005 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Hi,

Accessing that 0xc3cfdfad address looks like a corruption in application since in the default HelloWorld there is no memory range defining that address. Also base address and length seem corrupted.

I asked also for debug log to the probe, can you also please send the content of the "Debug messages" console? 

PS. Is the above gdb log the full log you obtained?

Greetings,
MCUXpresso IDE Support

0 Kudos

1,005 Views
ahmed_mostafa
Contributor II

What I provided above is the full content of the Debugger Console.

This is the content of the Console:

[MCUXpresso Semihosting Telnet console for 'evkmimxrt1060_hello_world LinkServer Debug' started on port 22557 @ 127.0.0.1]

Can you please show me what I need to do to provide the logs you're looking for?

0 Kudos

1,005 Views
converse
Senior Contributor V
0 Kudos