Wednesday, April 25th 2018, 10:25pm UTC+2

You are not logged in.

  • Login
  • Register

NiklasG

Beginner

Date of registration: Mar 14th 2018

Posts: 1

1

Wednesday, March 14th 2018, 4:26pm

J-Link GDB debugging fails on NXP i.MX7 Cortex-M4 when running from OCRAM with cache enabled.

Hi,

We are developing an application for the Cortex-M4 core on the NXP i.MX7 using Exclipse + gcc + GDB + J-Link.

Our plan is to run the M4 application from the OCRAM memory since the TCM memory is too small for our final application.

When we build the application to not not enable the cache everything works and we can load, execute, single-step and set break-points.

But when we enable the cache it does not work. We can still load the code and execution stops at the start of main():

Quoted

Setting breakpoint @ address 0x2020495C, Size = 2, BPHandle = 0x0001
Starting target CPU...
...Breakpoint reached @ address 0x2020495C
Reading all registers
Removing breakpoint @ address 0x2020495C, Size = 2
Read 4 bytes @ address 0x2020495C (Data = 0xF7FFB507)
Reading 64 bytes @ address 0x20204940
Reading 64 bytes @ address 0x20204980
But if a single-step is performed or if the execution is resumed the GDB console just outputs the three lines below endlessly and the target does not execute:

Quoted

...Breakpoint reached @ address 0x2020495C
Reading all registers
Performing single step...
...Breakpoint reached @ address 0x2020495C
Reading all registers
Performing single step...
...Breakpoint reached @ address 0x2020495C
Reading all registers
Performing single step...
...Breakpoint reached @ address 0x2020495C
Reading all registers
Performing single step...
If we download the application with cache enabled to the eMMC memory and start it from U-Boot it works as expected without any issues.

Any ideas?

Thanks!

/Niklas

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 956

2

Thursday, March 15th 2018, 11:08am

Hello Niklas,

Thank you for your inquiry.
Such an issue is not known to us.
Which iMX7 are you using exactly?
Here is an overview of our currently supported devices: https://wiki.segger.com/IMX_Series_Devices
Are you using custom hardware or an eval board?

Best regards,
Nino
Please read the forum rules before posting: Forum Rules

Keep in mind, this is not a support forum. Its main purposes is user to user interaction.
Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
Should you be entitled to support contact us per e-mail.
The following contact form can be used for this: https://www.segger.com/about-us/contact-us/


v01d

Beginner

Date of registration: Feb 29th 2016

Posts: 110

3

Tuesday, April 17th 2018, 12:48pm

NiklasG, Nino

Was this resolved ?? How. Please share, have the same , likely , issue. ;(

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 956

4

Wednesday, April 18th 2018, 10:35am

Hello,

We received no answer from the customer so we have no information if that has been resolved for Niklas.

Best regards,
Nino
Please read the forum rules before posting: Forum Rules

Keep in mind, this is not a support forum. Its main purposes is user to user interaction.
Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
Should you be entitled to support contact us per e-mail.
The following contact form can be used for this: https://www.segger.com/about-us/contact-us/


v01d

Beginner

Date of registration: Feb 29th 2016

Posts: 110

5

Thursday, April 19th 2018, 5:08am

Hello,
We received no answer from the customer so we have no information if that has been resolved for Niklas.
Best regards,
Nino


Hi Nino,

Do you have any solution for this, or can you confirm the problem?
I reproduce the reported issue, by enabling / disabling cache for the memory in question. (Also, as I reported to Segger support, it's same issue without GDB, but with Ozone )

I've seen other reports that, it seems, ARM's D-Link debugger does not have similar issue with the cache enabled / not.

This post has been edited 1 times, last edit by "v01d" (Apr 19th 2018, 5:09am)