Added 64 bit support, CM4 detection and more - #4
Open
infopcgood wants to merge 6 commits into
Open
infopcgood wants to merge 6 commits into
infopcgood wants to merge 6 commits into
Conversation
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.
With a few hours of debugging I was able to track down the 64-bit 'Bus error' issue to memcpy, and with the suggestion of ChatGPT I replaced it with a simple for loop that copies all the content of one buffer to another, one by one.
This code is probably very inefficient, but I don't know about memory well enough to improve it. Further touches will be needed.
I also added a version string mapping for the Raspberry Pi Compute Module 4, and removed a seemingly meaningless 2840 μs delay.
Tested on a Raspberry Pi CM4 (RAM 8GB, eMMC 32GB) running the latest version of Raspberry Pi OS Lite (64 bit, Trixie) + CM4 IO board with one LED strip. The code successfully runs when configured for 16 strips and will display the correct colors for a single strip, but I was not able to test it with 16 LED strips as I don't have them yet.