I am having some trouble debugging a Freescale SabreSD board with i.MX6Q.
I am running the GDB server on Linux using version V4.74. The e-mail for this release stated:
- DLL: Reset support for Freescale i.MX6 added.
I could not find a -device for i.MX6, even by dumping the list of devices with the command line tool. Therefore I resorted to:
./StartJLinkGDBServer.sh -device Cortex-A9
If there is a -device option for this board, please tell me the option and perhaps nothing more needs to be done.
If there is no other option than what I used, continue...
I have the following in eclipse:
set debug remote 1
set remotetimeout 60
monitor reset 1
monitor sleep 1000
monitor memU32 0x020bc000 = 0x30
monitor memU32 0x020c4068 = 0xffffffff
monitor memU32 0x020c406c = 0xffffffff
monitor memU32 0x020c4070 = 0xffffffff
...
Essentially, reset the processor and write to registers so that DDR works, clocks are setup, etc. These settings are known good and work with another "un-named" probe from another vendor. I am also debugging an image that works with the other vendor. In other words, all this works with another probe, just not my preferred J-Link probe.
When gdb tries to reset, it can't halt. It proceeds and then seems to write the image, etc. But it can't read memory from registers, OCRAM, DDR, etc.
I suspect the problem is the reset, due to the messages.
A second natural question is, how to talk to the other 3 cores. I suspect I will have to use a script to do this. In the final solution, I would prefer to do this initialization in a script file anyway. I was unsuccessful at initializing with a script. It would be nice to have a script that can handle reset and initialization I can start with if you can provide one. The alternative would be to allow a script to override the functions and call the default ones within them so I can add the register initialization. If there is a way to call the originals, please let me know how to do that.
I have attached the messages from J-Link so you can have a look.
I am running the GDB server on Linux using version V4.74. The e-mail for this release stated:
- DLL: Reset support for Freescale i.MX6 added.
I could not find a -device for i.MX6, even by dumping the list of devices with the command line tool. Therefore I resorted to:
./StartJLinkGDBServer.sh -device Cortex-A9
If there is a -device option for this board, please tell me the option and perhaps nothing more needs to be done.
If there is no other option than what I used, continue...
I have the following in eclipse:
set debug remote 1
set remotetimeout 60
monitor reset 1
monitor sleep 1000
monitor memU32 0x020bc000 = 0x30
monitor memU32 0x020c4068 = 0xffffffff
monitor memU32 0x020c406c = 0xffffffff
monitor memU32 0x020c4070 = 0xffffffff
...
Essentially, reset the processor and write to registers so that DDR works, clocks are setup, etc. These settings are known good and work with another "un-named" probe from another vendor. I am also debugging an image that works with the other vendor. In other words, all this works with another probe, just not my preferred J-Link probe.
When gdb tries to reset, it can't halt. It proceeds and then seems to write the image, etc. But it can't read memory from registers, OCRAM, DDR, etc.
I suspect the problem is the reset, due to the messages.
A second natural question is, how to talk to the other 3 cores. I suspect I will have to use a script to do this. In the final solution, I would prefer to do this initialization in a script file anyway. I was unsuccessful at initializing with a script. It would be nice to have a script that can handle reset and initialization I can start with if you can provide one. The alternative would be to allow a script to override the functions and call the default ones within them so I can add the register initialization. If there is a way to call the originals, please let me know how to do that.
I have attached the messages from J-Link so you can have a look.