I recently looked at the bootloader -- boot270 of youlong 270. This bootloader can only be used for both boot wince and boot Linux. It was written by Intel and modified by youlong.
In boot270, the memory also needs to be moved like uboot. During the migration, data such as image $ Ro $ limit needs to be used.
The variable with $ is the reserved variable of ads. It can be seen in the ADS link guide that there is no variable in the source file, as if it was generated during link.
I read the article about how to calculate image $ Ro $ limit on the Internet:
Http://z86k.blog.163.com/blog/static/90796156201002511040829/
This version is mostly used on the Internet.
Yes:
| Image $ Ro $ base | = image entry point = 0x0c100000; indicates the starting address for storing program code | image $ Ro $ limit | = starting address of program code + code length + 1 = 0x0c100000 + tatal Ro size + 1
My image entry point = 0xa000 0000
Code compilation:
Code Ro data RW data Zi data debug
57960 155433 4722 9699 grand totals
========================================================== ====================
Total Ro size (code + RO data) 213393 (208.39kb)
Total RW size (RW data + Zi data) 14421 (14.08kb)
Total Rom size (code + RO Data + RW data) 218115 (213.00kb)
========================================================== ====================
Calculated as follows (218115d = 0x35403 ):
0xa000 0000 + 0x3 5403 + 1 =0x0xa003 5404
However, I can see in the output image symbol table of the project:
Global symbols
Symbol name value ov type size object (Section)
Image $ Ro $ limit 0xa00341b4 number 0 anon $ obj. O absolute
Image $ RW $ base 0xa2000000 number 0 anon $ obj. O absolute
Description Image $ Ro $ Limit =0xa00341b4This is not consistent with the calculation result above. I don't know which one is correct?