I'm trying to run a bootscript that automatically jumps to the address of a program located in Flash.
I typed the following command to the Losh prompt:
losh> echo "LOLOjump 0x000C0000; exit" /dev/serial_eeprom
now the content of my the eeprom is the following:
losh> hd /dev/serial_eeprom
0xc003d8a0 4c 4f 4c 4f 6a 75 6d 70 20 30 78 30 30 30 43 30 LOLOjump 0x000C0
0xc003d8b0 30 30 30 3b 20 65 78 69 74 2e 2e 2e 2e 2e 2e 2e 000; exit.......
0xc003d8c0 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e ................
0xc003d8d0 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e 2e ................
0xc003d8e0 2e 2e 2e 2e 2e 2e ff ff ff ff ff ff ff ff ff ff ................
0xc003d8f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
0xc003d900 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
0xc003d910 ff ff ff ff ff ff ff ff 01 23 45 67 ff ff ff ff .........#Eg....
losh>
When I reboot the board, this is the screen I get on Tera Term Pro:
g_periph.touch: 0
g_periph.net: 0
g_periph.audio: 0
losh> #EgCPLD_CE_REG_REVISION: 0x34 (rev: b)...............................
CPLD_CE_REG_MODE : 0xfe
*****************************************************************
LogicLoader
(c) Copyright 2002-2003, Logic Product Development, Inc.
All Rights Reserved.
Version BRA_release_1-2-pre1.2.5
*****************************************************************
Available commands:
load - download a binary image of type 'elf', or 'srec'
burn - burns the already-loaded image into flash device 'device'
erase - erases 'device' from start_address for length bytes
jump - jump to a loaded image, or [address]
exec - disable cache & ints, then jump to a loaded OS, or to [addr]
source - execute a series of losh commands stored in <filename>
w - write memory [of specified width] at addr
x - examine memory with [width][format] at an addr for a [len]
date - display the number of seconds since boot
info - print information about: version, arch, mem, net, cpu
help - print help for a single command or a group of commands.
losh>
If you notice the fourth line it is the following:
losh> #EgCPLD_CE_REG_REVISION: 0x34 (rev: b)...............................
What happens is that the script in the eeprom was excuted, but it simply prints the words "jump 0x000C0000......................................................................" on the screen, then the line get overwritten by "#EgCPLD_CE_REG_REVISION: 0x34 (rev: b)", and eventually I get the losh> prompt again.
What am I not understanding properly? I thought that executing the script will jump to the address 0x000C0000 instead of returning to the LOSH prompt.
Thanks in advance,
Yujie
|