jump using blhost

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

jump using blhost

Jump to solution
962 Views
embedded_eng_
Contributor III

Hi,

Im using blhost to jump to my image (execute).

the first 8 bytes of my bin file are: 00 00 01 20 71 01 00 00

So my command is:

./blhost -u 0x1fc9,0x0022 execute 0x00000171 0 0x20010000

Now, I've noticed that it will work with every address I pass to the command, for example:

./blhost -u 0x1fc9,0x0022 execute 0xaaaaaaaa 0 0x20010000

Why?

What is the correct way to do it?

Tags (3)
0 Kudos
1 Solution
860 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

I'm not sure the inside processing of command "execute", I think the reason for "Why does the jump command with an invalid address works as well?" is your image start from 0x00000, so no matter the address is , it always start up from 0x0000, it can work well.

If image start from other address, for example, in mcu, a secondary bootloader +APP module, APP

start from 0x1000, then the <address> should the exactly data as User's Guide said.

Or image is in RAM, also <address> need read from first 8 bytes.

 

BR

Alice

 

View solution in original post

0 Kudos
4 Replies
901 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

First one is correct.

0 Kudos
891 Views
embedded_eng_
Contributor III

Hi, Thanks for the response.

Why does the jump command with an invalid address works as well?

Any Address that I've tried worked..

The commands fails only when I try a different stack pointer.

Another question: 

Before the jump I'm writing to address 0x00000000, should I write instead to address 0x00000171 (taken from 8 first bytes)?

 

Thanks 

0 Kudos
861 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

I'm not sure the inside processing of command "execute", I think the reason for "Why does the jump command with an invalid address works as well?" is your image start from 0x00000, so no matter the address is , it always start up from 0x0000, it can work well.

If image start from other address, for example, in mcu, a secondary bootloader +APP module, APP

start from 0x1000, then the <address> should the exactly data as User's Guide said.

Or image is in RAM, also <address> need read from first 8 bytes.

 

BR

Alice

 

0 Kudos
913 Views
embedded_eng_
Contributor III

Someone?

Before the "execute" command, I'm running:

./blhost -u 0x1fc9,0x0022 write-memory 0x00000000 file.bin

 

0 Kudos