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

Add FastLED as ESP-IDF component support #1352

Merged
merged 2 commits into from
May 29, 2023
Merged

Conversation

solhuebner
Copy link
Contributor

Enables FastLED as ESP-IDF component support (with Arduino as component)

Enables FastLED as ESP-IDF component support (with Arduino as component)
@solhuebner
Copy link
Contributor Author

I should have been more verbose ;) This library already has a component.mk file but for full CMake support the CMakeLists.txt is also needed. That is especially useful if you want to use the ESP-IDF for the ESP32 (and its variants) for example, as they make use of CMake. That way you have more control but you also need to add all the 3rd party libraries as "components". Probably the most useful to start with is ESP32-Arduino but if you also want to use proven and loved libraries (like this one) you need to add the CMake files manually if they do not exist (what took me a bit to understand how it works). Some libraries like ESP32-HUB75-MatrixPanel-I2S-DMA already implemented support, so I hope this one will too :)

@samguyer
Copy link
Contributor

@solhuebner Thank you for your contribution! Would you mind taking a look at the related issue submitted by another user? I have not had a chance to look closely at it myself, but #1380 shows the compile problems.

@JustinOng
Copy link

Hello @samguyer, the compile issues when targeting the ESP32-S3 has been traced to a missing F_CPU definition, and a fix has been proposed at espressif/arduino-esp32#7913. Is there anything else blocking the merge of this PR? I'm hoping to see this merged, rather than me creating another dead fork to merge this myself.

@JustinOng
Copy link

src/platforms/esp/32/clockless_rmt_esp32.cpp needs to be added to the list of sources.

@solhuebner
Copy link
Contributor Author

solhuebner commented Mar 24, 2023

src/platforms/esp/32/clockless_rmt_esp32.cpp needs to be added to the list of sources.

Thanks. I will have a look over the weekend and update the PR.

Add clockless to CMakeLists.txt
@solhuebner
Copy link
Contributor Author

solhuebner commented Mar 26, 2023

src/platforms/esp/32/clockless_rmt_esp32.cpp needs to be added to the list of sources.

@JustinOng I added it as requested. Can you please test it?

@JustinOng
Copy link

Looks good to me, thank you! At the moment, I'm just manually adding in your CMakeLists.txt with the following script:

cmake_minimum_required(VERSION 3.18)
include(FetchContent)

FetchContent_Declare(
  fastledlib
  GIT_REPOSITORY https://github.com/FastLED/FastLED.git
  GIT_TAG 4d73cddfe4bd2b370ee882b6f68769bf7f8309f4
  SOURCE_DIR fastled
)

FetchContent_GetProperties(fastledlib)
if(NOT fastledlib_POPULATED)
    FetchContent_Populate(fastledlib)
    configure_file(${CMAKE_CURRENT_LIST_DIR}/FastLED_CMakeLists.txt ${fastledlib_SOURCE_DIR}/CMakeLists.txt COPYONLY)
endif()

list(APPEND EXTRA_COMPONENT_DIRS ${fastledlib_SOURCE_DIR}/)

@kriegsman kriegsman merged commit 96a148a into FastLED:master May 29, 2023
@kriegsman
Copy link
Member

Thank you -- this is a great piece of support to have contributed. Thanks for helping out with FastLED!

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.

None yet

4 participants