2024A-SW/components/Serial_Console/CMakeLists.txt
Joe Kearney 7807ce0ece Added the "KEvent" console command. (#17)
This PR adds a new console command, "KEvent", which allows the sending of arbitrary events to the [state machine](https://ktag.clubk.club/Technology/SystemK/#state-machine).  The events are specified by [ID](https://git.ktag.clubk.club/Software/SystemK/src/tag/SystemK_v01.01/Events/KEvents.h#L33-L86), which may change from release-to-release of SystemK.

```
KTag> KEvent
Usage:
  KEvent <Event ID> <Event Data>
  (Note that IDs may be SystemK version-dependent.)
```

Co-authored-by: Joe Kearney <joe@clubk.club>
Reviewed-on: #17
2026-03-01 22:19:58 +00:00

36 lines
974 B
CMake

idf_component_register(
SRCS
"Console.c"
"Commands/Log_Command.c"
"Commands/KEvent_Command.c"
"Commands/System_Command.c"
INCLUDE_DIRS
"."
"./Commands"
REQUIRES
"SystemK"
"System_Events"
"app_update"
"console"
"espcoredump"
"esp_netif"
"esp_pm"
"esp_timer"
"log"
"nvs_flash"
"spi_flash"
"vfs"
)
target_compile_definitions(${COMPONENT_LIB} PRIVATE HAS_SYSTEMK_GIT_VERSION)
add_custom_target(generate_git_versions ALL
COMMAND ${CMAKE_COMMAND}
-DSOURCE_DIR=${CMAKE_SOURCE_DIR}
-DOUTPUT_FILE=${CMAKE_CURRENT_BINARY_DIR}/git_versions.h
-P ${CMAKE_CURRENT_SOURCE_DIR}/generate_git_versions.cmake
BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/git_versions.h
)
add_dependencies(${COMPONENT_LIB} generate_git_versions)
target_include_directories(${COMPONENT_LIB} PUBLIC ${CMAKE_CURRENT_BINARY_DIR})