fl_startImageAddAt offset problems
Posted: Mon May 21, 2018 12:19 pm
Hello,
creating flash image with the following command:
xflash -v --factory app_1.xe 409600 --loader loader.xc --upgrade 1 app_2.xe 409600 --upgrade 2 app_3.xe 409600 --upgrade 3 app_4.xe 409600 --boot-partition-size 1892352 --data data_partition.bin --no-compression --noinq -o flash.bin
having four app images with equal size 409600 B and custom loader.xc
In the the output flash.bin file all looks fine, can see non zero data at addresses 0x0, 0x64000, 0xC8000 and 0x12C000 - perfect.
doing flash dump from the app_1 with hw_flash_get_factory_image & hw_flash_get_next_boot_image after the image write with xtag - looks ok as well.
app1 start 0xEFC len 409600
app2 start 0x64000 len 409600
app3 start 0xC8000 len 409600
app4 start 0x12C000 len 409600
The problem arises when app2 is erased (power off while doing ImageReplace) and new app2 is flashed with fl_startImageAddAt, fl_writeImagePage and fl_endWriteImage.
From the fl_startImageAddAt doc - offset Offset of this image write from the base of the first sector after the factory image.
So setting offset to 0 while calling fl_startImageAddAt and doing flash dump again gives me app2 start at 0x65000 - one sector further then expected 0x64000?
Seems to me like fl_startImageAddAt is taking into the account that app1 starts at 0xEFC while the rest of the tools do not?
ideas?
any help would be appreciated sine I would like to keep the full control of image addresses in the flash.
wbr
malo
creating flash image with the following command:
xflash -v --factory app_1.xe 409600 --loader loader.xc --upgrade 1 app_2.xe 409600 --upgrade 2 app_3.xe 409600 --upgrade 3 app_4.xe 409600 --boot-partition-size 1892352 --data data_partition.bin --no-compression --noinq -o flash.bin
having four app images with equal size 409600 B and custom loader.xc
In the the output flash.bin file all looks fine, can see non zero data at addresses 0x0, 0x64000, 0xC8000 and 0x12C000 - perfect.
doing flash dump from the app_1 with hw_flash_get_factory_image & hw_flash_get_next_boot_image after the image write with xtag - looks ok as well.
app1 start 0xEFC len 409600
app2 start 0x64000 len 409600
app3 start 0xC8000 len 409600
app4 start 0x12C000 len 409600
The problem arises when app2 is erased (power off while doing ImageReplace) and new app2 is flashed with fl_startImageAddAt, fl_writeImagePage and fl_endWriteImage.
From the fl_startImageAddAt doc - offset Offset of this image write from the base of the first sector after the factory image.
So setting offset to 0 while calling fl_startImageAddAt and doing flash dump again gives me app2 start at 0x65000 - one sector further then expected 0x64000?
Seems to me like fl_startImageAddAt is taking into the account that app1 starts at 0xEFC while the rest of the tools do not?
ideas?
any help would be appreciated sine I would like to keep the full control of image addresses in the flash.
wbr
malo