I have a AT91SAM9261 Eval Kit, and I am trying to load and debug a simple "getting-started" example. I am very close to getting it working, but it still does not seem to load correctly. Here is where I am:
-I can compile code properly, load it through SAM-BA and run it without a problem.
-I have GDB server running, and I set all of the appropriate executables in the debug configuration (e.g. arm-elf-gdb)
-I am using the following gdb init file to initialize the processor and load the binary file:
Display All
J-Link GDB server's log shows all the commands running successfully (as does eclipse), and then it says
Display All
At this point, it just hangs there, and Eclipse on the bottom right says 'Launching test (27%)', where test is the name of the debug session I created.
Another piece of info is that every once in a while, when I try to run this, I get an gdb syntax error on line 11. If I restart Eclipse then it doesn't give me that error.
Adit
-I can compile code properly, load it through SAM-BA and run it without a problem.
-I have GDB server running, and I set all of the appropriate executables in the debug configuration (e.g. arm-elf-gdb)
-I am using the following gdb init file to initialize the processor and load the binary file:
Source Code
- # Listening for commands on this PC's tcp port 2331
- target remote localhost:2331
- # Set gdb server to little endian
- monitor endian little
- # Set JTAG speed to adaptive
- monitor speed adaptive
- # Reset the chip to get to a known state.
- monitor reset 8
- monitor sleep 10
- #
- # Disable the watchdog and setup the PLL
- #
- # WDT_MR, disable watchdog
- monitor writeu32 0xFFFFFD44 = 0x00008000
- # CKGR_MOR
- monitor writeu32 0xFFFFFC20 = 0x00004001
- monitor sleep 10
- # CKGR_PLLAR
- monitor writeu32 0xFFFFFC28 = 0xBF092060
- monitor sleep 10
- # PMC_MCKR
- monitor writeu32 0xFFFFFC30 = 0x00000102
- monitor sleep 10
- # PMC_IER
- monitor writeu32 0xFFFFFC60 = 0x00480100
- # monitor writeu32 0xFFFFFC60 = 0x0
- monitor sleep 100
- # Set JTAG speed in khz
- monitor speed adaptive
- load
- break main
- continue
J-Link GDB server's log shows all the commands running successfully (as does eclipse), and then it says
Source Code
- Connected to 127.0.0.1
- Reading all registers
- Read 4 bytes @ address 0x00000000 (Data = 0x00000000)
- Target endianess set to "little endian"
- Select adaptive clocking instead of fixed JTAG speed
- Resetting target (SAM7 soft reset)
- Sleep 10ms
- Writing 0x00008000 @ address 0xFFFFFD44
- Writing 0x00004001 @ address 0xFFFFFC20
- Sleep 10ms
- Writing 0xBF092060 @ address 0xFFFFFC28
- Sleep 10ms
- Writing 0x00000102 @ address 0xFFFFFC30
- Sleep 10ms
- Writing 0x00480100 @ address 0xFFFFFC60
- Sleep 100ms
- Select adaptive clocking instead of fixed JTAG speed
- Downloading 4080 bytes @ address 0x00300000
- Downloading 4080 bytes @ address 0x00300FF0
- Downloading 2628 bytes @ address 0x00301FE0
- Downloading 1256 bytes @ address 0x00302A24
- Writing register (PC = 0x00300070)
- Read 4 bytes @ address 0x00000000 (Data = 0xEA000004)
- Setting breakpoint @ address 0x00300678, Size = 4, BPHandle = 0x0001
- Starting target CPU...
At this point, it just hangs there, and Eclipse on the bottom right says 'Launching test (27%)', where test is the name of the debug session I created.
Another piece of info is that every once in a while, when I try to run this, I get an gdb syntax error on line 11. If I restart Eclipse then it doesn't give me that error.
Adit