DFU not working on XUF216-512 platform
Posted: Sun Mar 26, 2017 8:25 pm
Hello guys,
I'm struggling with DFU on our XMOS XUF216-512 platform running USB audio.
First I burn the factory image with 0x104000 boot partition size as:
xflash --factory test.xe --boot-partition-size 0x104000
Then I get whats in readout.bin which was read from the actual memory. It looks like there is just 76KB of code right at the beginning with some zero padding.
Then I create the upgrade binnary file. I changed the BCD version to higher version, build type to upgrade, rebuild, create binary upgrade 1:
xflash --factory-version 14.2 --upgrade 1 test_update.xe -o fw_0500.bin
Update the XMOS succesfully thru DFU, but the firmware that boots up is the old factory one and not the DFU update. Whats in the flash memory you can see in the readout_dfu_loaded.bin.
The upgrade firmware is loaded on top of the factory image, which is expected I guess.
And now this is the wierd part. My constraint check is this:
Constraint check for tile[0]:
Cores available: 8, used: 6 . OKAY
Timers available: 10, used: 8 . OKAY
Chanends available: 32, used: 19 . OKAY
Memory available: 262144, used: 46012 . OKAY
(Stack: 3500, Code: 31168, Data: 11344)
Constraints checks PASSED.
Constraint check for tile[1]:
Cores available: 8, used: 1 . OKAY
Timers available: 10, used: 1 . OKAY
Chanends available: 32, used: 2 . OKAY
Memory available: 262144, used: 104868 . OKAY
(Stack: 932, Code: 19928, Data: 84008)
Constraints checks PASSED.
Build Complete
There is just our little OLED routine on one tile1 first core for now. The reason for the 100KB RAM taken are pictures, fonts etc... When I don't start the tile 1 OLED core, then I get about 4KB of tile 1 RAM taken.
Now when I take that firmware with suspended tile 1 core and create the upgrade bin file the same way and send it over DFU the actual thing boots the new image and works correctly (obviously without the display as the oled tile 1 core is not running).
My first guess was that the bootloader partition is not big enough, I tried lot of different sizes, from 512K to all the 2MB of flash. Nothing worked.
I tried different versions of drivers, from 1.6, 2.23 to 3.38. Again, nothing. I tried playing with BCD, enabling/disabling DFU, nothing helped.
Any idea where could be the problem? Image always loads over DFU correctly, it is in the flash memory, but the old factory image boots up. Could it be the xmos interface that I created between the tiles that is (probably) not running when the tile1 OLED core is stopped?
Thank you very much for any help. Files are attached below.
I'm struggling with DFU on our XMOS XUF216-512 platform running USB audio.
First I burn the factory image with 0x104000 boot partition size as:
xflash --factory test.xe --boot-partition-size 0x104000
Then I get whats in readout.bin which was read from the actual memory. It looks like there is just 76KB of code right at the beginning with some zero padding.
Then I create the upgrade binnary file. I changed the BCD version to higher version, build type to upgrade, rebuild, create binary upgrade 1:
xflash --factory-version 14.2 --upgrade 1 test_update.xe -o fw_0500.bin
Update the XMOS succesfully thru DFU, but the firmware that boots up is the old factory one and not the DFU update. Whats in the flash memory you can see in the readout_dfu_loaded.bin.
The upgrade firmware is loaded on top of the factory image, which is expected I guess.
And now this is the wierd part. My constraint check is this:
Constraint check for tile[0]:
Cores available: 8, used: 6 . OKAY
Timers available: 10, used: 8 . OKAY
Chanends available: 32, used: 19 . OKAY
Memory available: 262144, used: 46012 . OKAY
(Stack: 3500, Code: 31168, Data: 11344)
Constraints checks PASSED.
Constraint check for tile[1]:
Cores available: 8, used: 1 . OKAY
Timers available: 10, used: 1 . OKAY
Chanends available: 32, used: 2 . OKAY
Memory available: 262144, used: 104868 . OKAY
(Stack: 932, Code: 19928, Data: 84008)
Constraints checks PASSED.
Build Complete
There is just our little OLED routine on one tile1 first core for now. The reason for the 100KB RAM taken are pictures, fonts etc... When I don't start the tile 1 OLED core, then I get about 4KB of tile 1 RAM taken.
Now when I take that firmware with suspended tile 1 core and create the upgrade bin file the same way and send it over DFU the actual thing boots the new image and works correctly (obviously without the display as the oled tile 1 core is not running).
My first guess was that the bootloader partition is not big enough, I tried lot of different sizes, from 512K to all the 2MB of flash. Nothing worked.
I tried different versions of drivers, from 1.6, 2.23 to 3.38. Again, nothing. I tried playing with BCD, enabling/disabling DFU, nothing helped.
Any idea where could be the problem? Image always loads over DFU correctly, it is in the flash memory, but the old factory image boots up. Could it be the xmos interface that I created between the tiles that is (probably) not running when the tile1 OLED core is stopped?
Thank you very much for any help. Files are attached below.