lpc2k_pgm: fix build warnings, add lpc2388 #12868
Merged
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
GCC now warns when
snprintf()
ing a buffer that, together with the format string, might be larger than the destination buffer.To fix this increase the size of the destination buffer so that the source buffer and the format string will always fit - 32 bytes are enough.
This also adds the signature of the lpc2388 to
lpc2k_pgm
.The MCU is very simmilar to lpc2387 and can be flashed with this tool too.
Testing procedure
You should still be able to flash lpc23xx boards like the
msba2
, but without the distracting warnings.Issues/PRs references
split off #12669