— Updated question due to new insight —
I am trying to debug the cortex-m4 using ds-5 and ARM Keil ULINKpro D debug adapter. I followed this tutorial Using ARM DS-5 IDE with Cortex-M4 of a Colibri iMX7 with the help of posts from the community as well as the toradex video tutorial (link text).
I am now able to debug the cortex-m4 processor sometimes. The following observations were made:
Intercepting the boot process
U-Boot 2016.11-2.8.4+g07edca0 (Oct 11 2018 - 12:24:31 +0000)
CPU: Freescale Vybrid VF610 at 500 MHz
Reset cause: WDOG A5
DRAM: 256 MiB
NAND: 512 MiB
MMC: FSL_SDHC: 0
In: serial
Out: serial
Err: serial
Model: Toradex Colibri VF61 256MB IT V1.2B, Serial# 08396019
Net: FEC
Hit any key to stop autoboot: 0
Colibri VFxx #
I am not able to connect to the vf61, getting the following error message:
If I start the m4 processor manually:
Colibri VFxx # ubi part ubi
ubi0: default fastmap pool size: 200
ubi0: default fastmap WL pool size: 100
ubi0: attaching mtd1
ubi0: attached by fastmap
ubi0: fastmap pool size: 200
ubi0: fastmap WL pool size: 100
ubi0: attached mtd1 (name "mtd=3", size 510 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi0: good PEBs: 4070, bad PEBs: 10, corrupted PEBs: 0
ubi0: user volume: 4, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 8/2, WL threshold: 4096, image sequence number: 0
ubi0: available PEBs: 0, total reserved PEBs: 4070, PEBs reserved for bad PEB handling: 70
Colibri VFxx # ubi read ${loadaddr} m4firmware
No size specified -> Using max size (173243)
Read 173243 bytes from volume m4firmware to 80008000
Colibri VFxx # bootaux ${loadaddr}
## Starting auxiliary core at 0x1F0002E1 ...
Colibri VFxx #
I am then able to debug the cortex-m4 processor.
I have set the variables “defargs” and “ubiboot” as described here FreeRTOS on the Cortex-M4 of a Colibri VF61. If I now reset and start the normal bootup:
U-Boot 2016.11-2.8.4+g07edca0 (Oct 11 2018 - 12:24:31 +0000)
CPU: Freescale Vybrid VF610 at 500 MHz
Reset cause: WDOG A5
DRAM: 256 MiB
NAND: 512 MiB
MMC: FSL_SDHC: 0
In: serial
Out: serial
Err: serial
Model: Toradex Colibri VF61 256MB IT V1.2B, Serial# 08396019
Net: FEC
Hit any key to stop autoboot: 0
Booting from NAND...
ubi0: default fastmap pool size: 200
ubi0: default fastmap WL pool size: 100
ubi0: attaching mtd1
ubi0: attached by fastmap
ubi0: fastmap pool size: 200
ubi0: fastmap WL pool size: 100
ubi0: attached mtd1 (name "mtd=3", size 510 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi0: good PEBs: 4070, bad PEBs: 10, corrupted PEBs: 0
ubi0: user volume: 4, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 8/2, WL threshold: 4096, image sequence number: 0
ubi0: available PEBs: 0, total reserved PEBs: 4070, PEBs reserved for bad PEB handling: 70
No size specified -> Using max size (173243)
Read 173243 bytes from volume m4firmware to 80008000
## Starting auxiliary core at 0x1F0002E1 ...
No size specified -> Using max size (4776584)
Read 4776584 bytes from volume kernel to 81000000
No size specified -> Using max size (27599)
Read 27599 bytes from volume dtb to 82000000
Kernel image @ 0x81000000 [ 0x000000 - 0x48e288 ]
## Flattened Device Tree blob at 82000000
Booting using the fdt blob at 0x82000000
Using Device Tree in place at 82000000, end 82009bce
Updating MTD partitions...
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.4.158-2.8.4 ....
I can see that the m4 is started due to the entry “## Starting auxiliary core at 0x1F0002E1 …” as well my led blinking on my board. But I am no longer able to debug the m4 processor. The error message is the same as the snapshot above.
It should be possible to debug the cortex m4 while running linux on the a5?
Why do I have to start the m4 processor manually in uboot? In the toradex video tutorial this should not be necessary.
Please let me know if you need additional documents. Thanks.