Scrip Commands . . . . Help

Anything related to script should go here.
Locked
Pichardo
Junior Member
Posts: 79
Joined: Tue Jun 17, 2008 11:19 pm

Scrip Commands . . . . Help

Post by Pichardo »

Inside the Scrip Command . . .

I like to learn howto use much better the scrip lenguaje used in USBJTAG(nt) software... chicking some scrip like dct2500.usp, I found many command but let's see this one first...

Code: Select all

[color=red]TRAP[/color] == 1
what a mean this ???

TRAP == 1 and TRAP == 0

When do i need to use this command ?

for your help// thankz in advanced.

Keep Trying . . . !
CAPONE
Junior Member
Posts: 5011
Joined: Sat Dec 27, 2008 3:25 pm

Post by CAPONE »

Pichardo wrote:Inside the Scrip Command . . .

I like to learn howto use much better the scrip lenguaje used in USBJTAG(nt) software... chicking some scrip like dct2500.usp, I found many command but let's see this one first...

Code: Select all

[color=red]TRAP[/color] == 1
what a mean this ???

TRAP == 1 and TRAP == 0

When do i need to use this command ?

for your help// thankz in advanced.

Keep Trying . . . !
Is seams like a Check or Instruction Not a COMMAND.
Look Here

if CMPRAM == 0 that means echo program failed goto continue


if TRAP == 1 Software is Instructed to goto restoreloop
Pichardo
Junior Member
Posts: 79
Joined: Tue Jun 17, 2008 11:19 pm

Post by Pichardo »

CAPONE wrote:Is seams like a Check or Instruction Not a COMMAND.
Look Here

if CMPRAM == 0 that means echo program failed goto continue


if TRAP == 1 Software is Instructed to goto restoreloop
CMPRAM == 0 significa si la comparacion es exacta osea que no hay diferencia.. continue... de lo contrario... hace otra cosa... ese comando lo entiendo bien.

Pero el TRAP cuando hay que usarlo o porque se usa ?

Creo que tiene que ver con el estado del usbjtag(nt) o del device que se este probando. . . no se algo de eso.. seria bueno si alguien tiene mejor conocimiento lo compartiera con los menos favorecidos...

Sorry for el spanglish... se me acabo el ingles :(

Keep Trying . . . !

Note: If you believe is much better in the spanish seccion . . you can move it. I posted here because many more people share in english.
usbbdm
Junior Member
Posts: 8962
Joined: Mon Jul 18, 2005 9:33 pm

Post by usbbdm »

The "==" is used to test the result.
"TRAP==1" means if the target is in trap on mode.

I am glad someone are interested in the scrip. This is very powerful script and can improve the efficiency a lot if you make proper script.
Pichardo
Junior Member
Posts: 79
Joined: Tue Jun 17, 2008 11:19 pm

Post by Pichardo »

Thankz for your help usbbdm . .

Thats is what i saw... a powerfull tool to make more easy the test.

TRAP == 1 in a few word amean

I'm testing with a DP301-013 ird satellite and TRAP On is next to Dectect command only if the target is conected at AC Power Line.

This command can i use in the scrip to detect if the IRD is Conected at AC Line ?

Like this:

Code: Select all

begin:
cls
if TRAP == 1
echo You need power off on the box
goto continue
endif
/////////////////////////////////////////////
//    DP 301-013 1 Chip Script
/////////////////////////////////////////////
Keep Trying . . . !
CAPONE
Junior Member
Posts: 5011
Joined: Sat Dec 27, 2008 3:25 pm

Post by CAPONE »

usbbdm wrote:The "==" is used to test the result.
"TRAP==1" means if the target is in trap on mode.

I am glad someone are interested in the scrip. This is very powerful script and can improve the efficiency a lot if you make proper script.
If you care to Show Us, When you Have time, It would be Great for Us to make Scripts to meet our Needs. ;)
usbbdm
Junior Member
Posts: 8962
Joined: Mon Jul 18, 2005 9:33 pm

Post by usbbdm »

There is no universal script.
Script has to be build for individual to meet "his own needs".
usbbdm
Junior Member
Posts: 8962
Joined: Mon Jul 18, 2005 9:33 pm

Post by usbbdm »

Pichardo wrote:Thankz for your help usbbdm . .

Thats is what i saw... a powerfull tool to make more easy the test.

TRAP == 1 in a few word amean

I'm testing with a DP301-013 ird satellite and TRAP On is next to Dectect command only if the target is conected at AC Power Line.

This command can i use in the scrip to detect if the IRD is Conected at AC Line ?

Like this:

Code: Select all

begin:
cls
if TRAP == 1
echo You need power off on the box
goto continue
endif
/////////////////////////////////////////////
//    DP 301-013 1 Chip Script
/////////////////////////////////////////////
Keep Trying . . . !
There is no easy way to detect the power. But you can send detect and see if CPU ID is detected. If it is then power is on.
CAPONE
Junior Member
Posts: 5011
Joined: Sat Dec 27, 2008 3:25 pm

Post by CAPONE »

usbbdm wrote:There is no universal script.
Script has to be build for individual to meet "his own needs".
Thats My point. If you can give Us some Help and Pointers on How to make Scripts to meet our Needs. :D
Pichardo
Junior Member
Posts: 79
Joined: Tue Jun 17, 2008 11:19 pm

Post by Pichardo »

I understand that now.. thankz a lot...

Now move on next . . .

Code: Select all

begin:
cls
if TRAP == 1
echo You need power off on the box
goto continue
endif
/////////////////////////////////////////////
//    DP 301-013 1 Chip Script
/////////////////////////////////////////////
echo 1. Backup flash and eeprom
echo 2. Restore flash and eeprom
echo 3. Debrick (When normal programming not working)
echo 4. Firmware Testing (Cloning)
echo 5. Exit
option 1 backup 2 restore 3 end 4 testing 5 end
backup:
detect
wait 800
echo backup flash
getram firm
save firm
echo back eeprom
getram eeprom
save eeprom
goto continue
restore:
detect
wait 800
echo restore flash
[b][color=red]flashchk[/color] 7FC00000
if FLASHSET == 0[/b]
echo flash not defined
goto continue
endif
ldram firm
erase firm
sprogram firm
wait 1000
cmpram firm
if CMPRAM == 0
echo program failed
goto continue
endif
echo restore eeprom
ldram eeprom
program eeprom
cmpram eeprom
restoreloop:
echo Please power off/on the box
pause
if TRAP == 1
goto restoreloop
endif
goto begin
debrick:
echo Use jumper to short J200. Then power on the box.
pause
detect
wait 800
tap c
tap a ffffffff
wait 1000
if DEBUG == 0
echo Please try again
goto continue
endif
echo Remove the jumber
pause
detect
if FLASHSET == 0
echo flash not defined
goto continue
endif
erase boot
echo Load proper boot
ldram boot
checkmdw 90000000
if MEMORY != 1000018f
echo Your boot code does not seems to be right.
goto continue
endif
sprogram boot
scmpram boot
if CMPRAM == 0
echo Please power off/on the box and try to debrick again
endif
debrickloop:
echo Power off/on the box. Then use normal restore method to program the box.
pause
if DEBUG == 1
goto debrickloop
goto begin
testing:
detect
wait 800
echo restore flash
flashchk 7FC00000
if FLASHSET == 0
echo flash not defined
goto continue
endif
echo Firmware testing
getram firm
ldram privaty
erase firm
sprogram firm
wait 800
cmpram firm
if CMPRAM == 0
echo program failed
goto continue
endif
goto restoreloop
endif
continue:
pause
goto begin
end:
This command "flashchk" is used to check if we got detect right the FLASH or only if the Defenition is right ?

In the original i see the value was 90000000 and this is the starting address for memory but in the DP301-013 the starting address is 7FC00000 thats is why i change and work.

Keep Trying . . . !
usbbdm
Junior Member
Posts: 8962
Joined: Mon Jul 18, 2005 9:33 pm

Post by usbbdm »

CAPONE wrote:Thats My point. If you can give Us some Help and Pointers on How to make Scripts to meet our Needs. :D
There is some description in the pdf manual. Has anyone read it?
justsomeguy
Junior Member
Posts: 1417
Joined: Wed Jan 28, 2009 4:01 pm

Post by justsomeguy »

usbbdm wrote:There is some description in the pdf manual. Has anyone read it?
many times over i've read it...it EXPLAINS alot. and you can tell by alot of questions here that NOT MANY have actually read it. there is a VAULT of knowledge in it that's for sure. everything from explaining things that can be done to the COMMANDS people require to send...but does it tell you how to write scripts in it? it's been awhile so i don't have it memorized..lol...:cool:
live your life like a beer commericial
usbbdm
Junior Member
Posts: 8962
Joined: Mon Jul 18, 2005 9:33 pm

Post by usbbdm »

I am not in front of my JTAG now. But if you have special requirement I can make script. Of course I need to test it before I put in here.
Pichardo
Junior Member
Posts: 79
Joined: Tue Jun 17, 2008 11:19 pm

???

Post by Pichardo »

usbbdm wrote:There is some description in the pdf manual. Has anyone read it?
I read it but there is only Basic Command... same if you type help in the imput windows or command's windows.

All this command are not commented:

DEBUG == 1

flashchk 90000000
if FLASHSET == 0

checkmdw 90000000
if MEMORY != 1000018f

I apreciate a lot all your comment

Thankz Again

Keep Trying . . . !
usbbdm
Junior Member
Posts: 8962
Joined: Mon Jul 18, 2005 9:33 pm

Post by usbbdm »

The basic script command are show in the help.
The "control" command include "if" "goto" command. I hope this is not hard to understand giving that we have several script examples.
Locked

Who is online

Users browsing this forum: No registered users and 5 guests