jump using blhost

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,861件の閲覧回数
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?

タグ(3)
0 件の賞賛
返信
1 解決策
1,759件の閲覧回数
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 件の賞賛
返信
4 返答(返信)
1,800件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

First one is correct.

0 件の賞賛
返信
1,790件の閲覧回数
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 件の賞賛
返信
1,760件の閲覧回数
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 件の賞賛
返信
1,812件の閲覧回数
embedded_eng_
Contributor III

Someone?

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

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

 

0 件の賞賛
返信