getting included project to run on at91sam9261

I am trying to get a standart 9261 project on my olimex board, I am running the included Eclipse+openocd+zylin. I have the code compiling, building, and openocd connecting, but when i try to start the debugger i get:

source C:\gccfd\projects\gput91sam9261-ek-sdram.gdb
C:\gccfd\projects\gput91sam9261-ek-sdram.gdb:6: Error in sourced command file:
Cannot access memory at address 0xfffffc20
Configuring the master clock...
target remote localhost: 3333
0x865d6f84 in ?? ()
monitor soft_reset_halt
requesting target halt and executing a soft reset
load
Loading section .fixed, size 0x1be0 lma 0x20000000
Loading section .postrelocate, size 0x6c lma 0x20001be0
Start address 0x20000000, load size 7244
Transfer rate: 90 KB/sec, 3622 bytes/write.
break main
Breakpoint 19 at 0x200004ac: file main.c, line 348.
continue
Unable to set 32 bit software breakpoint at address 200004ac

no one has an idea? I have been at this for a week and I have no idea, im starting to wonder if there is a problem with the RAM.

Hi,

  1. Can you post your GDB startup configuration?

  2. You get an error for accessing the Main Oscillator Register (CKGR_MOR in PMC module, address 0xfffffc20). If you cannot initialize your system clock then SDRAM won’t work. You could lower down your JTAG clock and check that you toggle TRST before starting a debug session.

Regards,

Dimitar

# SDRAM initialization script for the AT91SAM9261
#------------------------------------------------
# Configure master clock
echo Configuring the master clock...\n
# Enable main oscillator
set *0xFFFFFC20 = 0x00004001
while ((*0xFFFFFC68 & 0x1) == 0)
end

# Set PLLA to 200MHz
set *0xFFFFFC28 = 0x2060BF09
while ((*0xFFFFFC68 & 0x2) == 0)
end

# Set PLLB for USB usage
set *0xFFFFFC2C = 0x207C3F0C
while ((*0xFFFFFC68 & 0x4) == 0)
end

# Select prescaler
set *0xFFFFFC30 = 0x00000100
while ((*0xFFFFFC68 & 0x8) == 0)
end

# Select master clock
set *0xFFFFFC30 = 0x00000102
while ((*0xFFFFFC68 & 0x8) == 0)
end

echo Master clock ok.\n
echo Configuring the SDRAM controller...\n

# Enable EBI chip select for the SDRAM
set *0xFFFFEE30 = 0x2

# SDRAM configuration
set *0xFFFFEA08 = 0x85227259

set *0xFFFFEA00 = 0x1
set *0x20000000 = 0

set *0xFFFFEA00 = 0x2
set *0x20000000 = 0

set *0xFFFFEA00 = 0x4
set *0x20000000 = 0
set *0xFFFFEA00 = 0x4
set *0x20000000 = 0
set *0xFFFFEA00 = 0x4
set *0x20000000 = 0
set *0xFFFFEA00 = 0x4
set *0x20000000 = 0
set *0xFFFFEA00 = 0x4
set *0x20000000 = 0
set *0xFFFFEA00 = 0x4
set *0x20000000 = 0
set *0xFFFFEA00 = 0x4
set *0x20000000 = 0
set *0xFFFFEA00 = 0x4
set *0x20000000 = 0

set *0xFFFFEA00 = 0x3
set *0x20000000 = 0

set *0xFFFFEA00 = 0x0
set *0x20000000 = 0

set *0xFFFFEA04 = 0x2B7

echo SDRAM configuration ok.\n

its the one that came with the software atmel software.

  1. I am using the same jtag speed to connect to my 9260L

Hello Agriggers…

Hev you managed to initialize CKGR_MOR/system clock for the SDRAM to work … ??

was it a JTAG Clock speed thing … ??? If so… could you give some advice … ??

I guess i’m having same Problem… !!

Thanxxx

I havent worked on it in a bit, i have been working with my 9260 which is working perfectly with the usbocd config speeds.

so i open it up today run it and get

source C:\gccfd\projects\gput91sam9261-ek-sdram.gdb
C:\gccfd\projects\gput91sam9261-ek-sdram.gdb:6: Error in sourced command file:
Cannot access memory at address 0xfffffc20
Configuring the master clock...
target remote localhost: 3333
0x00000000 in ?? ()
No line 581 in file "main.c".
No line 577 in file "main.c".
No line 588 in file "main.c".
No line 588 in file "main.c".
No line 588 in file "main.c".
monitor soft_reset_halt
requesting target halt and executing a soft reset
load
Loading section .fixed, size 0x1be0 lma 0x20000000
Loading section .postrelocate, size 0x6c lma 0x20001be0
Start address 0x20000000, load size 7244
Transfer rate: 76 KB/sec, 3622 bytes/write.
break main
Breakpoint 11 at 0x200004ac: file main.c, line 348.
continue
Unable to set 32 bit software breakpoint at address 200004ac

not too sure why that came up. this thing is driving me crazy. i have the 9260 dancing circles around itself, but i cant even get the 61 runnig

something new, I can put the code for the 61 on my 60, instructions are loaded and everything, it wont run, but thats to be expected. anyone know of a way to see of the olimex board is still alive? im starting to think it might have died.

Hey Agriggers…

looks like i’m so busy at the moment cant find sometime for the 9621 … (Yet…).

but last tries as so frustrating…

by the way… i’m kinda ‘new’ to the SAM9 world…

how far you went with the elder 9260 … ???

I have the 60 doing what I need to, recieving stuff, converting stuff, pit, pio all of that sort of thing, and its ready to forward to the 61, I just cant get the 61 working.

ok, so I got the 61 to accept code twice, same setup, same code, but now it wont again. what could make it do this? i did everything the same. could whats running on power up have anything to do with it?

well, talked to olimex and they told me to reload Linux, so i follow the instructions in the manual and receive this error log

-I- Waiting ...
connection : \usb\ARM0
board : AT91SAM9261-EK
target(handle) : 17957080
read chip ID : 0x00000000 at addr: 0xFFFFEE40
read chip ID : 0x019703A0 at addr: 0xFFFFF240
-I- Found processor : AT91SAM9261 (0x019703A0)
-I- Loading applet isp-extram-at91sam9261.bin at address 0x301000
-E- Error during external RAM initialization

problem solved!!! sdram was bad…sparkfun replaced it and my code loaded up perfectly.