Giter Site home page Giter Site logo

Comments (5)

thedjnK avatar thedjnK commented on June 2, 2024

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.

jomigo96 avatar jomigo96 commented on June 2, 2024

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.

nordicjm avatar nordicjm commented on June 2, 2024

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.

jomigo96 avatar jomigo96 commented on June 2, 2024

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.

nordicjm avatar nordicjm commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.