Buildscript and kernel improvements (#280)
- Implemented `constexpr long int getMicros()` in `Kernel.h` - Changed `secondsToTicks()`, `minutesToTicks()` and `bool isIsr()` to `constexpr` - Added more relevant build info
This commit is contained in:
committed by
GitHub
parent
870924229a
commit
74eb830870
@@ -1,3 +1,12 @@
|
||||
if (NOT WIN32)
|
||||
string(ASCII 27 Esc)
|
||||
set(ColorReset "${Esc}[m")
|
||||
set(Cyan "${Esc}[36m")
|
||||
else ()
|
||||
set(ColorReset "")
|
||||
set(Cyan "")
|
||||
endif ()
|
||||
|
||||
function(INIT_TACTILITY_GLOBALS SDKCONFIG_FILE)
|
||||
get_filename_component(SDKCONFIG_FILE_ABS ${SDKCONFIG_FILE} ABSOLUTE)
|
||||
# Find the board identifier in the sdkconfig file
|
||||
@@ -10,7 +19,7 @@ function(INIT_TACTILITY_GLOBALS SDKCONFIG_FILE)
|
||||
set(id_length 0)
|
||||
math(EXPR id_length "${sdkconfig_board_id_length} - 21")
|
||||
string(SUBSTRING ${sdkconfig_board_id} 20 ${id_length} board_id)
|
||||
message("Building board ${board_id}")
|
||||
message("Building board: ${Cyan}${board_id}${ColorReset}")
|
||||
|
||||
if (board_id STREQUAL "cyd-2432s024c")
|
||||
set(TACTILITY_BOARD_PROJECT CYD-2432S024C)
|
||||
@@ -53,7 +62,7 @@ function(INIT_TACTILITY_GLOBALS SDKCONFIG_FILE)
|
||||
if (TACTILITY_BOARD_PROJECT STREQUAL "")
|
||||
message(FATAL_ERROR "No subproject mapped to \"${TACTILITY_BOARD_ID}\" in root Buildscripts/board.cmake")
|
||||
else ()
|
||||
message("Board project: Boards/${TACTILITY_BOARD_PROJECT}")
|
||||
message("Board project: ${Cyan}Boards/${TACTILITY_BOARD_PROJECT}${ColorReset}\n")
|
||||
set_property(GLOBAL PROPERTY TACTILITY_BOARD_PROJECT ${TACTILITY_BOARD_PROJECT})
|
||||
set_property(GLOBAL PROPERTY TACTILITY_BOARD_ID ${board_id})
|
||||
endif ()
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
if (NOT WIN32)
|
||||
string(ASCII 27 Esc)
|
||||
set(ColorReset "${Esc}[m")
|
||||
set(Cyan "${Esc}[36m")
|
||||
set(Grey "${Esc}[37m")
|
||||
set(LightPurple "${Esc}[1;35m")
|
||||
set(White "${Esc}[1;37m")
|
||||
else ()
|
||||
set(ColorReset "")
|
||||
set(Cyan "")
|
||||
set(Grey "")
|
||||
set(LightPurple "")
|
||||
set(White "")
|
||||
endif ()
|
||||
+14
-14
@@ -4,24 +4,24 @@ file(READ ${VERSION_TEXT_FILE} TACTILITY_VERSION)
|
||||
|
||||
if (DEFINED ENV{ESP_IDF_VERSION})
|
||||
set(TACTILITY_TARGET " @ ESP-IDF")
|
||||
else()
|
||||
else ()
|
||||
set(TACTILITY_TARGET " @ Simulator")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if(NOT WIN32)
|
||||
if (NOT WIN32)
|
||||
string(ASCII 27 Esc)
|
||||
set(ColourReset "${Esc}[m")
|
||||
set(Cyan "${Esc}[36m")
|
||||
set(Grey "${Esc}[37m")
|
||||
set(ColorReset "${Esc}[m")
|
||||
set(Cyan "${Esc}[36m")
|
||||
set(Grey "${Esc}[37m")
|
||||
set(LightPurple "${Esc}[1;35m")
|
||||
set(White "${Esc}[1;37m")
|
||||
else()
|
||||
set(ColourReset "")
|
||||
set(Cyan "")
|
||||
set(Grey "")
|
||||
set(White "${Esc}[1;37m")
|
||||
else ()
|
||||
set(ColorReset "")
|
||||
set(Cyan "")
|
||||
set(Grey "")
|
||||
set(LightPurple "")
|
||||
set(White "")
|
||||
endif()
|
||||
set(White "")
|
||||
endif ()
|
||||
|
||||
# Some terminals (e.g. GitHub Actions) reset colour for every in a multiline message(),
|
||||
# so we add the colour to each line instead of assuming it would automatically be re-used.
|
||||
@@ -41,4 +41,4 @@ message("\n\n\
|
||||
${Cyan}@@@\n\
|
||||
${Cyan}@@@\n\
|
||||
${Cyan}@@@\n\
|
||||
${Cyan}@@\n\n${ColourReset}")
|
||||
${Cyan}@@\n\n${ColorReset}")
|
||||
|
||||
Reference in New Issue
Block a user