Skip to content

Conversation

@microbit-carlos
Copy link
Collaborator

@microbit-carlos microbit-carlos commented Jan 20, 2025

It also fixes an issue building with GCC v6 when stdio.h is included before MicroBit.h
This is because stdio packed in arm-none-eabi-gcc (probably newlibc? can't remember when they changed the default) seems to have macro for putc(int, FILE*) to cause havoc on putc methods in multiple CODAL classes like serial.

This issue was not triggered in the pxt-microbit builds using pext/yotta:lattest because the include line is in one of the file included in this repo, which pxt-microbit doesn't build.

Including stdio.h before MicroBit.h caused a stdio macro for
putc(int, FILE*) to cause havoc on putc methods in multiple CODAL
classes like serial.
Copy link
Collaborator Author

@microbit-carlos microbit-carlos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI passes and this change is needed to apply the same patch into the codal-microbit-v2 CI.

@microbit-carlos microbit-carlos merged commit efaa760 into master Jan 20, 2025
27 checks passed
@microbit-carlos microbit-carlos deleted the ci-older-gcc branch January 20, 2025 16:31
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.

2 participants