Comments (5)
This is expected, the MCUboot swap status goes there. An MCUboot image should be your whole image i.e. the hex/bin file, which then goes through imgtool to add the MCUboot header and footer, at this point that is the final image that cannot be changed, you cannot append data to the end of it. If you want to do that, you need to edit the hex/bin file before it is passed to imgtool
from mcuboot.
By image data I did not mean any modifications to the binary after imgtool, just the normal binary.
Let's say the image slot is 896 KiB with flash sectors of 128KiB. I observe that if the signed binary is larger than 768KiB, after upload this last sector is erased. Since it would have data/tlvs, the image is invalid. The same binary is working fine if flashed via debugger or uploaded without MCUBOOT_ERASE_PROGRESSIVELY
.
from mcuboot.
Let's say the image slot is 896 KiB with flash sectors of 128KiB. I observe that if the signed binary is larger than 768KiB, after upload this last sector is erased. Since it would have data/tlvs, the image is invalid. The same binary is working fine if flashed via debugger or uploaded without MCUBOOT_ERASE_PROGRESSIVELY.
This is incorrect, there is the TLVs which are part of the image, they do not go in a new sector. There is a new sector(s) which is/are used for the swap status, this should be visible on https://docs.mcuboot.com/design.html but the website is down at present for some reason
from mcuboot.
there is the TLVs which are part of the image, they do not go in a new sector
Not a new sector, but in the last sector of the slot due to the size of the binary requiring it.
There is a new sector(s) which is/are used for the swap status
But is it exclusively for swap status? The design page only mentions
Note: Be aware that the image trailers make the ending area of the image slot unavailable for carrying the image data. In particular, the swap status size could be huge. For example, for 128 slot sectors with a 4-byte alignment, it would become 1536 B.
I was under the impression that it needs space for swap information, but this is controlled by MCUBOOT_MAX_IMG_SECTORS
and the remaining space could be image data.
from mcuboot.
That Kconfig is the maximum number of sectors that will be searched and are supported (i.e. controls how large the swap field size will be), the size is limited by the partition size, so you can set that Kconfig to 5000 but with a 4KiB sector size and only 20 sectors in the partition, the 5000 value will just waste flash space, it will never go beyond 80KiB.
from mcuboot.
Related Issues (20)
- boot_serial: Image list lists empty slots, which probably should not happen HOT 2
- zephyr: CMSIS header makes it unable to build for non-arm arch
- Porting mcuboot to stm32 without os HOT 4
- serial recovery: Issue with queued commands
- Flash API simplification HOT 1
- Use open-once flash API
- Nuttx is missing CI
- Cypress platform is missing CI
- Mbed platform is missing from CI
- Explicit TFM platform testing
- Boot_serial: Stay in serial recovery until kicked from other app
- Multi-image: issues with dependencies between images HOT 1
- mcuboot doesn't build for the xiao_esp32s3 zephyr target
- Imgtool trailer size check incorrect for swap-using-move HOT 4
- imgtool custom TLV disregards endian and always uses big endian
- WARNING: Using default MCUBoot key, it should not be used for production. HOT 8
- Zephyr v3.4.0: MCUBoot doesn't clear the pending flag when configured to operate in RAM_LOAD mode (non-XIP). HOT 4
- zephyr: vector table calculation does not address possible alignment requirements of architecture. HOT 4
- Compiler Warning in bootutil_max_image_size due to Incorrect Argument Type HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcuboot.