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

Fix emulator build on MacOS #4242

Merged
merged 4 commits into from
Oct 9, 2024
Merged

Fix emulator build on MacOS #4242

merged 4 commits into from
Oct 9, 2024

Conversation

cepetr
Copy link
Contributor

@cepetr cepetr commented Oct 2, 2024

This PR fixes the emulator build on macOS.

  1. The reboot() function was renamed to reboot_device() to avoid a collision with the function of the same name in unitstd.h.

2) The emulator is now using the libc snprintf instead of the minimalistic mini_snprintf again (I reverted the change introduced in #4188).

  1. Fixed mini_printf() implementation, so it can be compiled on MacOS.

  2. Added string parameter _Static_assert in image.c. Looks like the macOS compiler has problem with single parameter version outside a function body.

  3. Final testing revealed several bugs that prevented the RSOD screen from being drawn in the emulator, so I fixed them as well.

@cepetr cepetr added the emulator only Issue which does not appear on the physical device - but on emulator only. label Oct 2, 2024
@cepetr cepetr requested a review from TychoVrahe October 2, 2024 14:43
@cepetr cepetr self-assigned this Oct 2, 2024
@cepetr cepetr requested a review from prusnak as a code owner October 2, 2024 14:43
@matejcik
Copy link
Contributor

matejcik commented Oct 3, 2024

2. The emulator is now using the libc snprintf instead of the minimalistic mini_snprintf again (I reverted the change introduced in Core firmware split #4188).

instead of reverting, how about this? 93e13f5

@cepetr cepetr force-pushed the cepetr/macos-build-fix branch 2 times, most recently from e687aa9 to bf375b1 Compare October 3, 2024 12:31
@cepetr
Copy link
Contributor Author

cepetr commented Oct 3, 2024

@matejcik Yes, this is better solution. I incorporated your proposal, see ccf0b2b.

@cepetr cepetr merged commit af4d792 into main Oct 9, 2024
85 checks passed
@cepetr cepetr deleted the cepetr/macos-build-fix branch October 9, 2024 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emulator only Issue which does not appear on the physical device - but on emulator only.
Projects
Status: Approved
Development

Successfully merging this pull request may close these issues.

2 participants