Conversation
The default SCons tools pick MSVC there. The host-side libpanda test library is skipped on Windows: -nostdlib does not link as a DLL. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
The test library's own Environment picked MSVC on Windows; use the mingw tool with clang like the firmware build. SCons requires the .dll suffix there, so name the target and the cffi path per platform, and skip the import library nobody links against. CANPacket_t is memcpy'd onto the USB wire, so the DLL must use the packed GCC bitfield layout (-mno-ms-bitfields): mingw's MS layout puts the checksum at byte 8 instead of 5. cffi's Windows backend follows MSVC bitfield rules and cannot be switched, but MSVC packs same-typed bitfields contiguously, so declaring the three flag bits as unsigned int like addr gives the firmware layout under both rule sets (unchanged layout on Linux and macOS). tests/usbprotocol/test_comms.py passes on Windows (5/5). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt
Owner
Author
|
Superseded by commaai#2427: comma's CI runs on the upstream PR now. |
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.
Fork-internal draft: runs this repository's own CI on the
windowsseries before it is proposed upstream. The base branchwindows-baseis the upstream commit the series builds on. Not for merging.🤖 Generated with Claude Code
https://claude.ai/code/session_016AgqYZYWLpwE2T5vS3nVEt