Repository navigation
Linux SPI port - #422
Linux SPI port#422mikeburg wants to merge 1 commit into
Conversation
|
Let me talk to Mark about this one - it might be better as a forked, separate project/repo. I have to admit I'm not thrilled about the idea of including a platform as "supported" while only supporting a subset of the led types that FastLED supports - this has been the primary reason why I haven't pursued any kind of Linux/macOS support in the library. |
|
Thanks for this PR. Dan and I will talk about the best way to share it with folks. Really nice to see how you dug in here to work on the library! |
|
I understand about not having "complete" support. There could be some annoyance with having to deal with support requests wondering why their WS2812s do not work under Linux. There has been some interest on the google+ group about this, so it might be useful to someone other than just me. :-) It is possible to add support for the other LED types (aka 3-wire) by incorporating pieces from other libraries that have already done this. My biggest concern is having to run the program as root to do hardware programming voodoo. (The DMA registers are mapped into the program's address space, and then manipulated directly.) The program in theory could crash the board if some bit of code starts to misbehave and ends up stomping on the mapped registers. Also if I understand things correctly, the on-board audio cannot be used at the same time due to a conflict over the PWM & hardware timers. I don't mean to poo-poo it. Its just not as clean as supporting 4-wire LEDs, and would take a little more effort. Its something I could definitely tackle. I've been enjoying using FastLED very much for a few projects. And I'm happy to give back in some way. |
|
FWIW, this was helpful to getting FastLED to spit out OpenPixelControl packets (faster development times when coding against a simulator). I hope this PR lands! |
|
I also used this to implement a simulator, which has proven to be very helpful in developing displays. Would you have any interest in a PR to add the simulator code to this repo for people to use, even if you don't want to support x86 for controlling strips? It seems like the simulator doesn't have as many of the problems you mentioned, and it seems like it could be helpful! |
|
I think a simulator would also make for an excellent, separate project (again, falls into the realm of code that I don't want to deal with directly supporting/ensuring I don't break with library rewrites/work) |
|
@focalintent yeah that makes sense wrt the simulator. I can understand not wanting to have these semi-supported platforms around, but the developer wins here are quite nice. |
|
If someone takes this on as a project that they will maintain and keep up to date with the main FastLED repo - I will happily reference it/link to it/point people at it. |
|
Daniel (and Mark) -- This is one last push on this and after that I promise to keep quiet on the matter. I understand there's an issue of an incomplete port, Yet If this is really more a matter of not wanting to deal with questions and issues regarding the port, that's fine. I'll be happy to jump in deal with those myself. There's no reason for you need to respond to questions regarding someone else code contribution that you are not 100% familiar with or interested in. Also, I'm very happy to coordinate with you on any rewrites in the future to help ensure a smooth code release. Yes, this is your baby -- it doesn't have to be entirely on your head for support. (The forked repo for the port under my account hasn't been updated for a while because I was hoping this would be picked up. Yet, if the pull request is a final no-go I'll start keeping parity with the main repo.) Please contact me directly if you want to talk about this more. |
|
I'm going to be adding a "null" platform to FastLED, that will make it easier to build/use the non-output driver portions of FastLED on non-embedded systems - that would allow someone to make a linux library/environment that builds on FastLED - best of both worlds, we get to keep the FastLED core focused on embedded, bare metal systems, but folks also get to provide FastLED on othe. r platforms/environments without having to do convoluted forking/changes. Going too use #698 for tracking this. |
|
Re-opening because the community wanted this feature so bad that they forked the repo a bunch of times. On the testing side, we need this platform native stuff so that we can unlock unit tests to verify correctness by contributors. These desktop platform tests also test that FastLED can continue to compile outside of an Arduino build environment. A linux spi driver is not a bad idea as it can be hooked into virtual device drivers (web assembly) or desktop USB led drivers. |
Picks up: - **LPC8xx bare-metal target** (FastLED/fbuild#419) — the Stage 1 deliverable from FastLED #2836 / #2845. Makes `fbuild build lpc845` and `fbuild build lpc804` actually work for the LPC port that this repo's `src/platforms/arm/lpc/` driver code targets. - **ESP32-S2/S3 USB_VID/USB_PID redef warnings fixed** (#413) — drops the 149-156 build-warning noise the ESP-IDF Arduino BSP was emitting on every TinyUSB-enabled build. - **build_info parent-dir creation for nested example envs** (#410) — fixes the case where `--examples Fx/FxNoisePalette` failed to write `build_info_<env>.json` because the env-name directory didn't exist. - **Vendor-warning scopings** — renesas FSP `-Wno-error=` demotions now scoped to vendor C sources only (#412); nRF52 `-Wno-array-bounds` scoped to Adafruit BSP only (#414). Both prevent FastLED-side warnings from being silenced. - **CLI Windows stack reservation** — larger reserved stack (ce37f03) for sketches with deep template instantiations. - **Test-fixture coverage** — SAMD (QT Py M0, Matrix Portal M4), STM32 (F0/L4 gap-tracking), ATmega tracker fixtures, CH559 intel_mcs51 smoke fixture — together back the validate_boards reconciliation tracked at FastLED/fbuild#421/#422. - **ESP32 daemon error surfacing + platform.json helper toolchains** (#402) — surfaces upstream daemon errors that previously got swallowed into a generic "build failed" exit. - **zccache pin** — bumped to >=1.11.15 (#418); the recent zccache cache-key + reconfigure improvements that match this repo's meson-wrapper hashing protocol. Verified locally — `uv run fbuild --version` reports `2.2.18`. Refs FastLED/fbuild#419, FastLED #2845 (LPC roadmap meta, closed).
This adds supports for SPI based (4-wire) led strips under Linux.