Skip to content

Commit

Permalink
Track UD_DEBUG better
Browse files Browse the repository at this point in the history
  • Loading branch information
lptr committed Oct 18, 2024
1 parent 2bbd8f4 commit 0b04cf0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ if(UD_DEBUG STREQUAL "")
set(UD_GEN 0)
endif()

# Make sure we reconfigure if UD_GEN and UD_DEBUG changes
# Make sure we reconfigure if UD_GEN changes
set_property(GLOBAL PROPERTY UD_GEN_TRACKER "${UD_GEN}")
set_property(GLOBAL PROPERTY UD_DEBUG_TRACKER "${UD_DEBUG}")

if(UD_GEN STREQUAL "MK4")
if (NOT "$ENV{IDF_TARGET}" STREQUAL "esp32s2")
Expand Down
14 changes: 14 additions & 0 deletions data-templates/i2c-mk7.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"instance": "DEVICE_INSTANCE",
"id": "DEVICE_ID",
"peripherals": [
{
"type": "environment:htu2x",
"params": {
"sda": "A2",
"scl": "A4"
}
}
],
"sleepWhenIdle": true
}
10 changes: 10 additions & 0 deletions main/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
FILE(GLOB_RECURSE app_sources main.cpp **/*.cpp)

if(NOT DEFINED UD_DEBUG)
set(UD_DEBUG "$ENV{UD_DEBUG}")
endif()
if(UD_DEBUG STREQUAL "")
set(UD_DEBUG 0)
endif()

# Make sure we reconfigure if UD_DEBUG changes
set_property(DIRECTORY PROPERTY UD_DEBUG_TRACKER "${UD_DEBUG}")

idf_component_register(
SRCS ${app_sources}
INCLUDE_DIRS "."
Expand Down

0 comments on commit 0b04cf0

Please sign in to comment.