Skip to content

Commit 9d1ef16

Browse files
committed
Port project to use cmake build system.
This permits to develop the project more easily and efficiently than with Arduino iIDE (which is a pain) Use the latest IDF framework version Compile for esp32C5 chip
1 parent eb75868 commit 9d1ef16

58 files changed

Lines changed: 748 additions & 146 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clangd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CompileFlags:
2+
Remove: [-f*, -m*]

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ debug_custom.json
33
esp32.vsd
44
esp32s3.svd
55
debug.cfg
6+
build/
7+
managed_components/
68

79
SomfyController.ino.XIAO_ESP32S3.bin
810
SomfyController.ino.esp32c3.bin

CMakeLists.txt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# For more information about build system see
2+
# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html
3+
# The following five lines of boilerplate have to be in your project's
4+
# CMakeLists in this exact order for cmake to work correctly
5+
cmake_minimum_required(VERSION 3.16)
6+
include(FetchContent)
7+
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
8+
9+
idf_build_set_property(MINIMAL_BUILD ON)
10+
11+
FetchContent_Declare(
12+
c1101_driver
13+
GIT_REPOSITORY https://github.com/Viproz/SmartRC-CC1101-Driver-Lib.git
14+
GIT_TAG 3664897200d1d695fbc78f7ae5d731cb2acff8be
15+
)
16+
17+
FetchContent_MakeAvailable(c1101_driver)
18+
19+
20+
FetchContent_Declare(
21+
pubsubclient
22+
GIT_REPOSITORY https://github.com/knolleary/pubsubclient.git
23+
GIT_TAG 2d228f2f862a95846c65a8518c79f48dfc8f188c
24+
)
25+
26+
FetchContent_MakeAvailable(pubsubclient)
27+
28+
FetchContent_Declare(
29+
arduinoWebSockets
30+
GIT_REPOSITORY https://github.com/Links2004/arduinoWebSockets.git
31+
GIT_TAG 8d0744eb5e916ec646d83bd1ffed5f643aab04d8
32+
)
33+
FetchContent_MakeAvailable(arduinoWebSockets)
34+
35+
36+
project(main)

SomfyController.ino.esp32.bin

-1.25 MB
Binary file not shown.

SomfyController.ino.esp32s3.bin

-1.13 MB
Binary file not shown.

SomfyController.littlefs.bin

-1.38 MB
Binary file not shown.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
idf_component_register(SRCS "${c1101_driver_SOURCE_DIR}/ELECHOUSE_CC1101_SRC_DRV.cpp"
3+
INCLUDE_DIRS "${c1101_driver_SOURCE_DIR}/"
4+
REQUIRES "arduino-esp32" # Library requires Arduino
5+
)
6+
7+
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-misleading-indentation -Wno-maybe-uninitialized)
8+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
file(GLOB_RECURSE SRCS_CPP ${arduinowebsockets_SOURCE_DIR}/src/*.cpp)
3+
4+
idf_component_register(SRCS ${SRCS_CPP}
5+
INCLUDE_DIRS "${arduinowebsockets_SOURCE_DIR}/src/"
6+
REQUIRES "arduino-esp32" # Library requires Arduino
7+
)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
idf_component_register(SRCS "${pubsubclient_SOURCE_DIR}/src/PubSubClient.cpp"
3+
INCLUDE_DIRS "${pubsubclient_SOURCE_DIR}/src/."
4+
REQUIRES "arduino-esp32" # Library requires Arduino
5+
)
6+
7+

debug.cfg

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)