Rename Boards/ to Devices/ (#414)

This commit is contained in:
Ken Van Hoeylandt
2025-11-13 23:50:43 +01:00
committed by GitHub
parent c7c9618f48
commit c1ff024657
314 changed files with 105 additions and 99 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ import shutil
from configparser import ConfigParser, RawConfigParser
VERBOSE = False
DEVICES_FOLDER = "Boards"
DEVICES_FOLDER = "Devices"
@dataclass
class IndexEntry:
@@ -219,4 +219,4 @@ if __name__ == "__main__":
if "--verbose" in sys.argv:
VERBOSE = True
sys.argv.remove("--verbose")
main(in_path=sys.argv[1], out_path=sys.argv[2], version=sys.argv[3])
main(in_path=sys.argv[1], out_path=sys.argv[2], version=sys.argv[3])
-30
View File
@@ -1,30 +0,0 @@
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
if (NOT EXISTS ${SDKCONFIG_FILE_ABS})
message(FATAL_ERROR "sdkconfig file not found:\nMake sure you select a device by running \"python device.py [device-id]\"\n")
endif ()
file(READ ${SDKCONFIG_FILE_ABS} sdkconfig_text)
string(REGEX MATCH "(CONFIG_TT_BOARD_ID\=\"[a-z0-9_\-]*\")" sdkconfig_board_id "${sdkconfig_text}")
if (sdkconfig_board_id STREQUAL "")
message(FATAL_ERROR "CONFIG_TT_BOARD_ID not found in sdkconfig:\nMake sure you select a device with 'python device.py device-id'")
endif ()
string(LENGTH ${sdkconfig_board_id} sdkconfig_board_id_length)
set(id_length 0)
math(EXPR id_length "${sdkconfig_board_id_length} - 21")
string(SUBSTRING ${sdkconfig_board_id} 20 ${id_length} board_id)
message("Board name: ${Cyan}${board_id}${ColorReset}")
set(TACTILITY_BOARD_PROJECT ${board_id})
message("Board path: ${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})
endfunction()
+32
View File
@@ -0,0 +1,32 @@
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 device identifier in the sdkconfig file
if (NOT EXISTS ${SDKCONFIG_FILE_ABS})
message(FATAL_ERROR "sdkconfig file not found:\nMake sure you select a device by running \"python device.py [device-id]\"\n")
endif ()
file(READ ${SDKCONFIG_FILE_ABS} sdkconfig_text)
string(REGEX MATCH "(CONFIG_TT_DEVICE_ID\=\"[a-z0-9_\-]*\")" sdkconfig_device_id "${sdkconfig_text}")
if (sdkconfig_device_id STREQUAL "CONFIG_TT_DEVICE_ID=\"\"" OR sdkconfig_device_id STREQUAL "")
message(FATAL_ERROR "CONFIG_TT_DEVICE_ID not found in sdkconfig:\nMake sure you select a device with 'python device.py device-id'")
endif ()
string(LENGTH ${sdkconfig_device_id} sdkconfig_device_id_length)
set(id_length 0)
# Total length minus chars of 'CONFIG_TT_DEVICE_ID=""'
math(EXPR id_length "${sdkconfig_device_id_length} - 22")
# Skip 'CONFIG_TT_DEVICE_ID="' then read the relevant (remaining) chars
string(SUBSTRING ${sdkconfig_device_id} 21 ${id_length} device_id)
message("Device identifier: ${Cyan}${device_id}${ColorReset}")
set(TACTILITY_DEVICE_PROJECT ${device_id})
message("Device project path: ${Cyan}Devices/${TACTILITY_DEVICE_PROJECT}${ColorReset}\n")
set_property(GLOBAL PROPERTY TACTILITY_DEVICE_PROJECT ${TACTILITY_DEVICE_PROJECT})
set_property(GLOBAL PROPERTY TACTILITY_DEVICE_ID ${device_id})
endfunction()