[E3-hacking] Adding write support to pbltool

mark mark at xenon-computing.com
Sun Jan 29 02:06:48 GMT 2006


Mark Underwood wrote:
> --- Jonathan McDowell <noodles at earth.li> wrote:
> 
>> On Sat, Jan 28, 2006 at 01:09:06AM +0000, David Given wrote:
>>> On Friday 27 January 2006 23:16, Jonathan McDowell wrote:
>>> [...]
>>>> I haven't looked at the code, but my notes say NOR flash is at 0x0,
>>>> SDRAM is at 0x10000000 and SRAM is at 0x20000000.
>>> That's different from the E2. Do you know if the jump-to opcode works
>>> on the E2's version of pbl? Because while pblq can write to RAM and
>>> flash, it can't execute anything.
>> I believe you can jump to code in SRAM, but not SDRAM. So you'd load
>> your kernel into SDRAM, load a small piece of setup code into SRAM and
>> jump to that. It would setup registers as appropriate and jump to the
>> kernel.
>>
>> J.
> 
> Thanks for the help. I can now write my program to my RAM (both SRAM & SDRAM) and have read back
> the contents and it match's what I have written :-). I have implemented the exec function so I
> _should_ now be able to run my own program on my E3. However, I have written a few simple assember
> programs and haven't seen any life from them (no UART output). I have tested the exec code by
> reading some data from the E3 and then running pbl exec 0x00000000 which starts the unit booting,
> so unless the have changed to byte order of the address that you need to pass to pbl for the exec
> the only thing I can think is wrong is my test program (my ARM assembly is a bit rusty :-( ). 
>  
> I have attached both my modifed pbltool and my latest test program. Any pointers would be great.
> If anyone has got some standalone code to run on the E3 please could you send me it so I can try
> it out. 
>  
> Mark


Hi Again,

Ok,

I tried to figure out why the output was not 0, 1 or 2 and noticed
Jasmines email about the mvn so I changed the mvn to mov and now I get
'0' written out at 115200 baud, cool!

I also noticed you are running pbl exec 0x00000000 whereas I am running
./pbltool exec  0x20010000.

But it is running.

Heres the output from writing/execing with pbltool.

Prodding...
Handshaking...
Got 4 of 14 bytes.
Got 8 of 10 bytes.
Got 2 of 2 bytes.
Checksum = 0x9A
Talking to PBL v4.9 Build 1311
Got 4 of 4 bytes.
Checksum = 0x91
Got 4 of 22 bytes.
Got 8 of 18 bytes.
Got 8 of 10 bytes.
Got 2 of 2 bytes.
Checksum = 0x4C
0 0x00000000 0x00020000 0x00000000 0x00020000 0x001F 0x0087
Got 4 of 22 bytes.
Got 8 of 18 bytes.
Got 8 of 10 bytes.
Got 2 of 2 bytes.
Checksum = 0x23
1 0x00400000 0x01B40000 0x00000000 0x00000000 0x007F 0x9875
bash-3.1$ ./pbltool write 0x20010000 dummy

Got 4 of 14 bytes.
Got 8 of 10 bytes.
Got 2 of 2 bytes.
Checksum = 0x9A
Talking to PBL v4.9 Build 1311
Entering writeblock
Got 4 of 4 bytes.
Checksum = 0xDB
sendpacket: 0 424 bytes transfered so far (0 KB)
bash-3.1$ ./pbltool exec  0x20010000
Got 4 of 14 bytes.
Got 8 of 10 bytes.
Got 2 of 2 bytes.
Checksum = 0x9A
Talking to PBL v4.9 Build 1311
Got 2 of 2 bytes.
Checksum = 0x86


And heres the reply from the E3

Connecting to /dev/ttyS0, speed 115200
 Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------
0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000
----------------------------------------------------
(/mnt/usr3/src/ckermit/) C-Kermit>




Regards, Mark.










More information about the e3-hacking mailing list