NOR image execute

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

NOR image execute

773 Views
nikolaykulikov
Contributor I

I'm using U-boot with my board on P1010 and download the barmetal application over TFTP. This application works correctly. Then I save this application into NOR flash and try to run this application - the application does not work. Comparing both images (obtained by tftp and read with NOR), they coincide in content.

Load from TFTP:

=> tftp 0x10000 b.bin

=> go 0x10100

--Correct start application--

Store and load from NOR Flash:

=> tftp 0x10000 b.bin

=> protect off 0xEC000000 +0x6ea14

=> erase 0xEC000000 +0x6ea14

=> cp.b 0x10000 0xEC000000 0x6ea14

=> reset

=> cp.b 0xEC000000 0x10000 0x6ea14

=> go 0x10100

--Application not starting--

Compare image:

=> tftp 0x100000 b.bin
Speed: 100, full duplex
Using eTSEC1 device
TFTP from server 192.168.200.104; our IP address is 192.168.200.201
Filename 'b.bin'.
Load address: 0x100000
Loading: T T ###############################
done
Bytes transferred = 453140 (6ea14 hex)
=> cp.b 0xEC000000 0x10000 0x6ea14
=> cmp.b 0x10000 0x100000 0x6ea14
Total of 453140 bytes were the same

However, (it was found out by experience) if after copying from NOR to make loading on TFTP in other area RAM - the image copied from NOR will work ((

Information:

* 0x6ea14 - filesize of application

* 0xEC000000 - start address NOR Flash

* 0x10000 - RAM address for load binary image

* 0x10100 - entry point of application

Labels (1)
0 Kudos
2 Replies

583 Views
alexander_yakov
NXP Employee
NXP Employee

Could you please describe in more details what you mean by "However, (it was found out by experience) if after copying from NOR to make loading on TFTP in other area RAM - the image copied from NOR will work ((" - please describe exact step-by step procedure, when the copied image will work, and how this procedure differs from procedure, where copied image does not work.


Have a great day,
Alexander
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

583 Views
nikolaykulikov
Contributor I

This problem was solved by reading a multiple of NOR blocks:

=> cp.b 0xec000000 0x10000 80000
=> go 0x10100

--Correct start application--

And the input value format of "count" has the meaning!

=> cp.b 0xec000000 0x10000 0x80000
=> go 0x10100

--Application not starting--

The reason for this is not clear to me :smileysad:

**And add command in U-boot environment "bootapp=cp.b 0xec000000 0x10000 80000; go 0x10100"; bootcmd=run bootapp has no effect - application not working. But "bootcmd=cp.b 0xec000000 0x10000 80000; go 0x10100" - application working!!:smileyconfused:

0 Kudos