Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Issue using BDI2000 cheat sheet with BDI3000: (7 Items)
   
Issue using BDI2000 cheat sheet with BDI3000  
Hi All,
I'm trying to use this cheat sheet:

Help -> Cheat Sheets -> QNX -> JTAG device - Abatron

on a freescale P2020RDB dev board with a BDI3000 to step through the QNX bsp.  

I believe I've followed the instructions to the letter, but upon starting the debug configuration the symbols and code 
appear to be downloaded but the target never halts at the intended breakpoint (as far as I can see.  The relevant lines 
from my bsp build are:

  Offset   Size    Entry   Ramoff Target=Host
  100000    180        0      --- C:\QNX650\target\qnx6\PPCBE\boot\sys/elf.boot
  100180    100     ----      --- Startup-header
  100280  1a188   103bb8      --- startup-p2020rdb.sym (629894554)

and the final output from the gdb console is:

(gdb) 

249 restore C:\\QNX_bsp_bdi3000_ws\\bsp-freescale-p2020-rdb\\Images\\image.elf 
&"restore C:\\\\QNX_bsp_bdi3000_ws\\\\bsp-freescale-p2020-rdb\\\\Images\\\\image.elf \n"
restore C:\\QNX_bsp_bdi3000_ws\\bsp-freescale-p2020-rdb\\Images\\image.elf 
~"Restoring section  (0x100180 to 0x7685b0)\n"
Restoring section  (0x100180 to 0x7685b0)
&"warning: restore: memory write failed (Input/output error).\n"
warning: restore: memory write failed (Input/output error).
249^done
(gdb) 
250 add-sym C:\\QNX_bsp_bdi3000_ws\\bsp-freescale-p2020-rdb\\Images\\startup-p2020rdb.sym 0x100280
&"add-sym C:\\\\QNX_bsp_bdi3000_ws\\\\bsp-freescale-p2020-rdb\\\\Images\\\\startup-p2020rdb.sym 0x100280\n"
~"add symbol table from file \"C:\\QNX_bsp_bdi3000_ws\\bsp-freescale-p2020-rdb\\Images\\startup-p2020rdb.sym\" at\n"
add symbol table from file "C:\QNX_bsp_bdi3000_ws\bsp-freescale-p2020-rdb\Images\startup-p2020rdb.sym" at
~"\t.text_addr = 0x100280\n"
	.text_addr = 0x100280
add-sym C:\\QNX_bsp_bdi3000_ws\\bsp-freescale-p2020-rdb\\Images\\startup-p2020rdb.sym 0x100280
250^done
(gdb) 
...
<removed to save space>
...
(gdb) 
252 info threads
&"info threads\n"
&"Cannot access memory at address 0x3ff34d40\n"
252^error,msg="Cannot access memory at address 0x3ff34d40"
(gdb) 
253-data-list-register-names
...
<removed to save space>
...
(gdb) 
254 set $pc=0x103bb8
&"set $pc=0x103bb8\n"
set $pc=0x103bb8
254^done
(gdb) 
255 tbreak _main
&"tbreak _main\n"
tbreak _main
~"Temporary breakpoint 1 at 0x102244\n"
Temporary breakpoint 1 at 0x102244
255^done
(gdb) 
256 continue
continue
&"continue\n"


(can attach more if required but didn't in the interest of brevity)

any suggestions would be much appreciated.
regards,
Robin Mallinson
RE: Issue using BDI2000 cheat sheet with BDI3000  
You have error writing the elf file to your memory:


-----Original Message-----
From: Robin Mallinson [mailto:community-noreply@qnx.com] 
Sent: Monday, October 18, 2010 1:40 PM
To: general-ide
Subject: Issue using BDI2000 cheat sheet with BDI3000

Hi All,
I'm trying to use this cheat sheet:

Help -> Cheat Sheets -> QNX -> JTAG device - Abatron

on a freescale P2020RDB dev board with a BDI3000 to step through the QNX
bsp.  

I believe I've followed the instructions to the letter, but upon
starting the debug configuration the symbols and code appear to be
downloaded but the target never halts at the intended breakpoint (as far
as I can see.  The relevant lines from my bsp build are:

  Offset   Size    Entry   Ramoff Target=Host
  100000    180        0      ---
C:\QNX650\target\qnx6\PPCBE\boot\sys/elf.boot
  100180    100     ----      --- Startup-header
  100280  1a188   103bb8      --- startup-p2020rdb.sym (629894554)

and the final output from the gdb console is:

(gdb) 

249 restore
C:\\QNX_bsp_bdi3000_ws\\bsp-freescale-p2020-rdb\\Images\\image.elf 
&"restore
C:\\\\QNX_bsp_bdi3000_ws\\\\bsp-freescale-p2020-rdb\\\\Images\\\\image.e
lf \n"
restore
C:\\QNX_bsp_bdi3000_ws\\bsp-freescale-p2020-rdb\\Images\\image.elf 
~"Restoring section  (0x100180 to 0x7685b0)\n"
Restoring section  (0x100180 to 0x7685b0)
&"warning: restore: memory write failed (Input/output error).\n"
warning: restore: memory write failed (Input/output error).
249^done
(gdb) 
250 add-sym
C:\\QNX_bsp_bdi3000_ws\\bsp-freescale-p2020-rdb\\Images\\startup-p2020rd
b.sym 0x100280
&"add-sym
C:\\\\QNX_bsp_bdi3000_ws\\\\bsp-freescale-p2020-rdb\\\\Images\\\\startup
-p2020rdb.sym 0x100280\n"
~"add symbol table from file
\"C:\\QNX_bsp_bdi3000_ws\\bsp-freescale-p2020-rdb\\Images\\startup-p2020
rdb.sym\" at\n"
add symbol table from file
"C:\QNX_bsp_bdi3000_ws\bsp-freescale-p2020-rdb\Images\startup-p2020rdb.s
ym" at
~"\t.text_addr = 0x100280\n"
	.text_addr = 0x100280
add-sym
C:\\QNX_bsp_bdi3000_ws\\bsp-freescale-p2020-rdb\\Images\\startup-p2020rd
b.sym 0x100280
250^done
(gdb) 
...
<removed to save space>
...
(gdb) 
252 info threads
&"info threads\n"
&"Cannot access memory at address 0x3ff34d40\n"
252^error,msg="Cannot access memory at address 0x3ff34d40"
(gdb) 
253-data-list-register-names
...
<removed to save space>
...
(gdb) 
254 set $pc=0x103bb8
&"set $pc=0x103bb8\n"
set $pc=0x103bb8
254^done
(gdb) 
255 tbreak _main
&"tbreak _main\n"
tbreak _main
~"Temporary breakpoint 1 at 0x102244\n"
Temporary breakpoint 1 at 0x102244
255^done
(gdb) 
256 continue
continue
&"continue\n"


(can attach more if required but didn't in the interest of brevity)

any suggestions would be much appreciated.
regards,
Robin Mallinson



_______________________________________________

General
http://community.qnx.com/sf/go/post71116
RE: Issue using BDI2000 cheat sheet with BDI3000  
Hit "send" too soon.

restore
C:\\QNX_bsp_bdi3000_ws\\bsp-freescale-p2020-rdb\\Images\\image.elf 
~"Restoring section  (0x100180 to 0x7685b0)\n"
Restoring section  (0x100180 to 0x7685b0)
&"warning: restore: memory write failed (Input/output error).\n"
warning: restore: memory write failed (Input/output error).

What's happened to your I/O?

-----Original Message-----
From: Andy Jin 
Sent: Monday, October 18, 2010 1:48 PM
To: 'post71116@community.qnx.com'
Subject: RE: Issue using BDI2000 cheat sheet with BDI3000

You have error writing the elf file to your memory:


-----Original Message-----
From: Robin Mallinson [mailto:community-noreply@qnx.com] 
Sent: Monday, October 18, 2010 1:40 PM
To: general-ide
Subject: Issue using BDI2000 cheat sheet with BDI3000

Re: RE: Issue using BDI2000 cheat sheet with BDI3000  
Thanks.  I don't know what's happened to the I/O.  The target has uboot configured with a 10 second bootdelay.  In my 
setup the bdi stops the target 3 seconds after reset, which stops it during this bootdelay.

I've confirmed that when I interrupt the bootdelay to get to the uboot prompt I can read and write all addresses that 
the BDI is trying to write to:  (0x100180 to 0x7685b0).  Here's a memory test in uboot of that area:

=> mtest 0x100180 0x7685b0 0xaaaaaaaa 1
Pattern AAAAAAAA  Writing...  Reading...Tested 1 iteration(s) without errors.
=> mtest 0x100180 0x7685b0 0x55555555 1
Pattern 55555555  Writing...  Reading...Tested 1 iteration(s) without errors.
=>

This is a pretty crude test, but I've run QNX from this memory before at this location, as uboot normally tftps QNX 
there, so I'm confident the memory is good, and that uboot can read/write it.  For example here's uboot loading an image
 from the same build there, and booting it (note the QNX prompts at the end):

=> tftp $loadaddr $bootfile
Speed: 1000, full duplex
Using eTSEC1 device
TFTP from server 192.168.0.101; our IP address is 192.168.0.102
Filename 'image.ifs'.
Load address: 0x100000
Loading: T T T T #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###
done

done
Bytes transferred = 6719036 (66863c hex)
=>  go $loadaddr
## Starting application at 0x00100000 ...
Board is P2020RDB
board_smp_init: 2 cpu
Looking for Config EEPROM on i2c,0 @ I2C address 0x00000050 ... found
Validating contents ... Error, no signature

Cpu_clk=1000000000, Sys_clk=100000000, CCB=500000000

System page at phys:0000b000 user:0000b000 kern:0000b000
Starting next program at v0015383c
Welcome to QNX Neutrino 6.5.0 on the PowerPC P2020RDB board
fs-etfs-p2020rdb512: readtrans BADBLK on cluster 0
Starting audit service...Interface 0 configured.
Starting I2C driver for I2C interface 1...
Set or Get the Time from Real Time Clock DS3232
rtc get: current RTC time is 2010/10/19 9:3:7 (UTC)
#
# uname -a
QNX localhost 6.5.0 2010/06/23-02:08:13EDT P2020RDB ppcbe
#


So my confusion now stems from the memory appearing to be writeable, but the BDI being unable to write to it.  Do you 
have any ideas as to what could be preventing the BDI from writing to the same place?
regards,
Robin 
Re: RE: Issue using BDI2000 cheat sheet with BDI3000  
From the output of your build, 100180 is your startup-header address, not your image address:

  Offset   Size    Entry   Ramoff Target=Host
  100000    180        0      --- C:\QNX650\target\qnx6\PPCBE\boot\sys/elf.boot
  100180    100     ----      --- Startup-header
  100280  1a188   103bb8      --- startup-p2020rdb.sym (629894554)

What is your image address? Look at the properties of your System Builder project for the "elf" image address section.
Re: RE: Issue using BDI2000 cheat sheet with BDI3000  
Actually this explains it:

=> tftp $loadaddr $bootfile
Speed: 1000, full duplex
Using eTSEC1 device
TFTP from server 192.168.0.101; our IP address is 192.168.0.102
Filename 'image.ifs'.
Load address: 0x100000
Re: RE: Issue using BDI2000 cheat sheet with BDI3000  
Yes I load the image to 0x100000 using uboot (as that's what I've set $loadaddr to equal) but I don't understand the 
relevance.  Do you think this has a bearing on the write failure?  Are you expecting a section of the image.elf file to 
be loaded to 0x100000 as well as 0x100180?  This would seem reasonable and may well be happening. I'll check the gdb 
logs when I return to the PC I've been doing the experiment with.

Nevertheless I don't understand how that relates to the BDI write failure.
regards,
Robin