Merged
Conversation
If external boards defined in one of the EXTERNAL_BOARD_DIRS folders pulls in a header file external to the RIOT tree and added to the build via the INCLUDES macro, the build will fail to find the header. This patch adds the INCLUDES macro to the bootloader build step so that the headers can be found.
When riotboot/slot.h is included, but riotboot is not enabled in the build, a compiler error occures. This is because SLOT0_LEN is not defined. This patch fixes this by surrounding the offending macrro with a conditional compile. `riotboot_slot_size()` may still be called, in which case it returns 0 for the size of any slot given.
benpicco
approved these changes
Jan 2, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
These patches fix some builds errors I experienced when playing with riotboot. The commit comments contain the details of each.
Testing procedure
Include riotboot/slots.h with riotbuild not enabled and observe that without this patch, the build will fail.
Attempt to build with an externally defined board which adds to the INCLUDES make macro and riotbuild enabled. Observe that without this patch, doing so will result in headers not being found which are located in those added include folders.
Issues/PRs references