Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bintools improvement / gapfill #2332

Closed
wants to merge 2 commits into from

Conversation

tejlmand
Copy link
Contributor

@tejlmand tejlmand commented Dec 3, 2024

bintools improvement / gapfill

…specific gap fill

Deprecate BUILD_NO_GAP_FILL as it gives a false impression that gap
filling can be disabled in binary files.
Binary files are always gap filled due to the fact they contain no
address information. Only option for binary files is to control the gap
fill pattern. When no gap fill is enabled in binary files, then a
default pattern is used by the tool, which usually is 0x00.

Generally the pattern 0x00 leads to unnecessary flash writes, as a
flash generally contains 0xFF after an erase.
Therefore provide a gap fill pattern Kconfig setting instead, with
default value of 0xFF.

For hex-files, intel hex and s19, then gap filling is generally not
needed but in order to still support cases where gap filling is required
then this commit introduces BUILD_OUTPUT_HEX_GAP_FILL and
BUILD_OUTPUT_S19_GAP_FILL. Both settings are disabled per default.

Signed-off-by: Torsten Rasmussen <[email protected]>
(cherry picked from commit 2e8868c16e5ecfab8e823096892e02dac037c222)
The llvm-objcopy doesn't support a gap-fill argument, therefore clear
the property to remove the error:
> llvm-objcopy: error: unknown argument '--gap-fill'

Signed-off-by: Torsten Rasmussen <[email protected]>
(cherry picked from commit 71fd4d9c98c7fe0845b70693e8daea46c6646b80)
@thst-nordic
Copy link
Contributor

we aren't going to use llvm until after v2.9, does it need to have 2.9 milestone?
still in alpha https://github.com/zephyrproject-rtos/sdk-ng/releases/tag/v0.18.0-alpha2

@tejlmand
Copy link
Contributor Author

tejlmand commented Dec 3, 2024

we aren't going to use llvm until after v2.9, does it need to have 2.9 milestone?
still in alpha https://github.com/zephyrproject-rtos/sdk-ng/releases/tag/v0.18.0-alpha2

this has nothing to do with Zephyr SDK LLVM.
LLVM is already supported as valid 3rd party toolchain by Zephyr, for example LLVM for ARM.

This is an improvement to existing infrastructure.

@thst-nordic thst-nordic self-requested a review December 4, 2024 07:44
@thst-nordic
Copy link
Contributor

sounds good. I see it also went into v2.8-branch.

@tejlmand
Copy link
Contributor Author

tejlmand commented Dec 4, 2024

closing, included in #2336

@tejlmand tejlmand closed this Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants