fix compilation issue 'array subscript 0 is outside array bounds' for arm-none-eabi-gcc version 13 #321
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.
Hello! :D
I got the following error when building with
arm-none-eabi-gcc
version13.2.0
, in Linux5.15.146-1-MANJARO
:It seems like this is an issue with newer GCC versions. Based on the discussion in #273: This was already fixed for GCC version 12, but the problem reappeared for GCC version 13.
I tested the same fix proposed in #273 (add the compile flag
--param=min-pagesize=0
). It solved the issue, and I could successfully compile the bootloader firmware.This PR is just an extension of the #273 fix. The conditional in the MakeFile now checks for both gcc versions 12 and 13 and applies the relevant compile flag. I tested the code against
arm-none-eabi-gcc
versions:13.2.0
12.2.Rel1
It worked with both.
Thank you for your time!