New C++ project, Unable to Debug

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

New C++ project, Unable to Debug

1,219 Views
sandeepa2
Contributor II

Hi All,

I have MCUXpresso v11.2.1[build 4149], I am trying to create a new C++ empty project with MIMXRT1064 SDK v2.8.2. I used the following options, UART as Debug console, package as MIMXRT1064DVL6A, operating system as baremetal. Not redirecting SDK "PRINTF" to C library, Double float soft ABI. I have selected MIMXRT1064.cfx as linkserver driver.

when I select debug, it goes to run mode automatically instead of stopping at main. and when I pause debug, the Heap & stack usage tab shows weird values as shown below. I am able to debug example projects, so my board is working. any help would be appreciated.

sandeepa2_0-1603788445689.png

sandeepa2_1-1603788624848.png

 

sandeepa2_2-1603788673960.png

 

0 Kudos
9 Replies

1,199 Views
converse
Senior Contributor V

As far as I know, NXP do not provide C++ examples.

 

if you post your failing project, we might be able to help you get it going.

0 Kudos

1,209 Views
converse
Senior Contributor V

I would guess that you have not defined your reset vector correctly. When using C++, don't forget to use extern "C" on your interrupted handlers (such as ResetISR etc).

0 Kudos

1,206 Views
sandeepa2
Contributor II

Is there a C++ example project which I can refer to? either i.MXRT1064 or any SDK belonging to the same family of crossover controllers?

0 Kudos

1,194 Views
sandeepa2
Contributor II

Here's the project

0 Kudos

1,161 Views
converse
Senior Contributor V

I can't see anything obviously wrong. When you debug, what exactly happens? What is the PC and stack value?

0 Kudos

1,187 Views
converse
Senior Contributor V

*deleted*

0 Kudos

1,157 Views
sandeepa2
Contributor II

I think I got different problems all at the same time. I found that my installation of IDE had a problem, so I reinstalled it. after that, I was able to debug with a J-link base debugger (for that I removed J44, J45, J46, J47, J48, J49 & J50 on MIMXRT1064-EVK), but Link server DAP probe is not working still, I have attached a screenshot in my original post about the status of HEAP & Stack when it is not working.

0 Kudos

1,141 Views
converse
Senior Contributor V

It would be useful to see the state when debugging fails. If you can, stop the processor (press the 'pause' button) and show the registers.

0 Kudos

1,126 Views
sandeepa2
Contributor II

I think the problem is with IDE installation, it started working after reinstallation.

Thanks for your help.

0 Kudos