Colibri iMX6DL JTAG problems

Hi!

After migrating our project to torizon from our previous yocto build we noticed that after connecting trough the JTAG interface it seems like the memory addresses are different:

Old:

(gdb) target remote localhost:2331
Remote debugging using localhost:2331
warning: No executable has been specified and target does not support
determining executable automatically.  Try using the "file" command.
0x802bc894 in ?? ()
(gdb) x 0x80000000
0x80000000:	0x000081a4

New:

(gdb) target remote localhost:2331
Remote debugging using localhost:2331
warning: No executable has been specified and target does not support
determining executable automatically.  Try using the "file" command.
0xc0263cde in ?? ()
(gdb) x 0xc0263cde

The main problem is we can’t dump arbitrary addresses, we can not dump the memory contents. It seems like some kind of memory protection is on that is blocking the debugger access?

(gdb) x 0xc0263c00
0xc0263c00:	Cannot access memory at address 0xc0263c00
(gdb) x 0x80000000
0x80000000:	Cannot access memory at address 0x80000000

We are using the same carrier board, torizon (torizon-core-docker-colibri-imx6-Tezi_5.3.0+build.7) also the resitor enabling the JTAG interface is on.

So is there some kind of memory protection mechanism on in the torizon builds and is there a way to disable them?

If I stop the booting process and connect the debugger while in uboot things work fine, I can read the memory at any address, but the watchdog kicks in and reboots the board:

U-Boot 2020.07-5.3.0+git.68f97c8d17f0 (Jan 01 1970 - 00:00:00 +0000)

CPU:   Freescale i.MX6DL rev1.4 996 MHz (running at 792 MHz)
CPU:   Commercial temperature grade (0C to 95C) at 67C
Reset cause: WDOG
DRAM:  512 MiB

I’ve tried to set the watchdog parameter to a high value, but it still reboots in approximatel one minute:

colibri-imx6-10809188:/var/rootdirs/home/torizon# dmesg | grep wdt
[    0.000000] Kernel command line: enable_wait_mode=off galcore.contiguousSize=50331648 clk_ignore_unused nohz=off nohlt imx2-wdt.timeout=999999 nowatchdog root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash ostree=/ostree/boot.1/torizon/ef97e39307ce88d280b3628845b25217e95c86da9f5bbfddedf410d78a8f7cfa/0
[    1.652206] imx2-wdt 20bc000.wdog: timeout 999999 sec (nowayout=0)

Do you have any idea, why the watchdog reboots the board?

Colibri iMX6DL 512MB V1.1A
Aster Carrier Board V1.1B
Capacitive Touch Display 7" V1.0B
Torizon Core

Thanks,
Aron

Hi @aron

Thanks for writing to the Toradex Community!

What is the reason for dumping the memory in Torizon?

Usually one would use JTAG debugger for Linux Bsp development but for Torizon or higher level languages, there are other ways to debug the application: Visual Studio Extension For Torizon | Toradex Developer Center

Best regards,
Jaski

Hi @jaski.tx

It’s for a research project we are working on, so for us the JTAG access is mandatory.

Aron

Hi @aron

I created an internal Ticket and I will let you know the outcome.

Thanks and best regards,
Jaski

Hi @aron

I just have a question, are you able to use the JTAG debugger when using Yocto Linux Reference Image?

Hi @jaski.tx

Sorry for the delay … Yes, it seems that with the latest Yocto Build it works just fine.

Best regards,
Aron

Hi Aron

No, issue, so it is working on Linux Reference Image and not on TorizonCore?
Thanks for this information.

Best regards,
Jaski

Hi @jaski.tx

Exactly!

Best regards,
Aron

Hi Aron

Thanks very much for your feedback.
Could you describe better your application?

  • which debugger exactly are you using?
  • what is your carrier board?
  • Which IDE or tools chain are you using to access the debugger?
  • Could you share maybe some examples files/scripts to reproduce the issue?

Best regards,
Jaski