IMX1050RT Stuck at ResetISR

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

IMX1050RT Stuck at ResetISR

3,106 Views
benolayinka
Contributor III

My project is stuck at ResetISR() in startup_mimx1052.c. It randomly started doing this when I added a breakpoint and then restarted the debugger. If I try to step in to the function, it just resets and stays at the same line. I think it's related to the REDLIB __main function because if I rename my main to __main, then the debugger reaches my program code but I have no semihosting console.

Things I've tried

Switching between semihosting and no hosting REDLIB, this worked temporarily but it's now stuck again.

Investigating REDLIB __main, I can't find the function anywhere in the project. Looking at other projects, I see it in the project.map file, but I guess it's a precompiled binary or something? Why can't I find it in the project?

Switching to NEWLIB, this should bypasses the call to __main but I still end up stuck at ResetISR.

Help! These cryptic errors make developing on this board a pain ;(

Labels (1)
Tags (1)
0 Kudos
Reply
8 Replies

2,942 Views
benolayinka
Contributor III

I figured it out. For some reason, breakpoints from other projects were affecting my project. The debugger tried to insert breakpoints in memory from all of the other projects in my workspace, and it ended up trying to access an invalid memory location, which trigged a reset interrupt before I even reached my program code.

I noticed this when I looked at the debugger console, I had only seen console messages since the view automatically switches to this window when debugging starts.

On your end, it's probably worth investigating why the debugger tries to set breakpoints from other projects in a running project. The debugger console also threw an error for all of the source files it couldn't find from other projects with breakpoints. I imagine this had actually been happening for a while, but it only faulted when one of those breakpoints happened to be in a memory location outside my memory map.

Here's what I get when running my own project, with breakpoints set in two other example projects:

 

GNU gdb (GNU Tools for Arm Embedded Processors 7-2018-q2-update) 8.1.0.20180315-git

.....

No source file named /Users/benolayinka/Documents/MCUXpressoIDE_10.3.1/workspace/evkbimxrt1050_lpi2c_interrupt/source/lpi2c_interrupt.c.

No source file named /Users/benolayinka/Documents/MCUXpressoIDE_10.3.1/workspace/evkbimxrt1050_host_cdc_bm/usb/host/class/usb_host_cdc.c.

The debugger shouldn't be looking for breakpoints from other projects, right?!

tl;dr, if you're hanging at ResetISR(); check the debugger console, and if necessary clear breakpoints from other projects since MCUXpresso will try to set any active breakpoint in any project in your running project.

2,943 Views
jeremyzhou
NXP Employee
NXP Employee

Hi BENJAMIN OLAYINKA,

Thanks for your clarification and it's right, in my opinion, the debugger shouldn't be looking for breakpoints from other projects.
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
Reply

2,943 Views
jeremyzhou
NXP Employee
NXP Employee

Hi BENJAMIN OLAYINKA,

Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
Before answering your question, I'd like to know the background about your testing, such as the EVK board, demo code, IDE, etc, it can help me to figure the phenomenon out.

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
Reply

2,943 Views
benolayinka
Contributor III

Also, when I stop the debugger or just connect the board, I can see that the program is running normally and responding to button presses etc. It just hangs on ResetISR when debugging.

0 Kudos
Reply

2,943 Views
jeremyzhou
NXP Employee
NXP Employee

Hi BENJAMIN OLAYINKA,

Thanks for your reply.
According to your statement, this weird phenomenon only happens after changing the main() to  __main, is it right?
If yes, whether you did the testing with the SDK library demos, and is it able to replicate the phenomenon?

pastedImage_19.png

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
Reply

2,943 Views
benolayinka
Contributor III

Hi Jeremy,

No. The problem randomly started happening without me changing any source code - I stopped the debugger, added a breakpoint, and the next time I ran, I was stuck at ResetISR. 

I went and looked through the ResetISR source, and I saw it calls __main. I searched for that function, and couldn't find it in the project, so I changed my main to __main, and then it ran, but without the debugging console working.

I am hung here:

Screen Shot 2019-07-16 at 18.32.56.png

and this line in ResetISR made me look for __main. I can't find it anywhere in the project, so I changed my main to __main and that's how I learned that it will kind of run.

Screen Shot 2019-07-16 at 18.33.10.png

Here's my search results in this project

Screen Shot 2019-07-16 at 18.36.08.png

0 Kudos
Reply

2,943 Views
jeremyzhou
NXP Employee
NXP Employee

Hi BENJAMIN OLAYINKA,

Thanks for your clarification.
whether you did the testing with the SDK library demos and is it able to replicate the phenomenon? On my site, I've not encountered this weird phenomenon when debugging the SDK library demos (testing with the MCUXpresso v11.0.0 and MIMXRT1050 board).

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
Reply

2,943 Views
benolayinka
Contributor III

Hi Jeremy,

I'm using an MIMX1050RT EVKB. This isn't a demo project, it's a FreeRTOS program I have been developing, which has been working fine until now, and the strange thing is that I didn't change any source code between compiles when this started happening. I'm using MCUXpresso IDE v10.3.1 [Build 2233] [2019-02-20].

Demos and other programs work normally, so I know it's something specific to my project.

Like I said, if I change my main to __main, it runs, but with no semihosting debugging console, so I believe the problem is somewhere in the Redlib __main. Searching my project for __main doesn't find anything, but if I search in other working projects, I can see a __main in the .map file, so maybe it somehow disappeared from my project?

0 Kudos
Reply