Align board project names with board ids (#399)

To avoid keeping track of a list that maps board project names to board ids.
Because of this change, we don't have to manually edit `boards.cmake` anymore when adding a new board.
This commit is contained in:
Ken Van Hoeylandt
2025-10-28 09:07:54 +01:00
committed by GitHub
parent efd3c6041c
commit 61277e74b8
250 changed files with 10 additions and 77 deletions
+4 -72
View File
@@ -20,76 +20,8 @@ function(INIT_TACTILITY_GLOBALS SDKCONFIG_FILE)
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}")
if (board_id STREQUAL "cyd-2432s024c")
set(TACTILITY_BOARD_PROJECT CYD-2432S024C)
elseif (board_id STREQUAL "cyd-2432s028r")
set(TACTILITY_BOARD_PROJECT CYD-2432S028R)
elseif (board_id STREQUAL "cyd-2432s028rv3")
set(TACTILITY_BOARD_PROJECT CYD-2432S028RV3)
elseif (board_id STREQUAL "cyd-e32r28t")
set(TACTILITY_BOARD_PROJECT CYD-E32R28T)
elseif (board_id STREQUAL "cyd-e32r32p")
set(TACTILITY_BOARD_PROJECT CYD-E32R32P)
elseif (board_id STREQUAL "cyd-2432s032c")
set(TACTILITY_BOARD_PROJECT CYD-2432S032C)
elseif (board_id STREQUAL "cyd-4848s040c")
set(TACTILITY_BOARD_PROJECT CYD-4848S040C)
elseif (board_id STREQUAL "cyd-8048s043c")
set(TACTILITY_BOARD_PROJECT CYD-8048S043C)
elseif (board_id STREQUAL "cyd-jc2432w328c")
set(TACTILITY_BOARD_PROJECT CYD-JC2432W328C)
elseif (board_id STREQUAL "cyd-jc8048w550c")
set(TACTILITY_BOARD_PROJECT CYD-JC8048W550C)
elseif (board_id STREQUAL "elecrow-crowpanel-advance-28")
set(TACTILITY_BOARD_PROJECT ElecrowCrowpanelAdvance28)
elseif (board_id STREQUAL "elecrow-crowpanel-advance-35")
set(TACTILITY_BOARD_PROJECT ElecrowCrowpanelAdvance35)
elseif (board_id STREQUAL "elecrow-crowpanel-advance-50")
set(TACTILITY_BOARD_PROJECT ElecrowCrowpanelAdvance50)
elseif (board_id STREQUAL "elecrow-crowpanel-basic-28")
set(TACTILITY_BOARD_PROJECT ElecrowCrowpanelBasic28)
elseif (board_id STREQUAL "elecrow-crowpanel-basic-35")
set(TACTILITY_BOARD_PROJECT ElecrowCrowpanelBasic35)
elseif (board_id STREQUAL "elecrow-crowpanel-basic-50")
set(TACTILITY_BOARD_PROJECT ElecrowCrowpanelBasic50)
elseif (board_id STREQUAL "lilygo-tdeck")
set(TACTILITY_BOARD_PROJECT LilygoTdeck)
elseif (board_id STREQUAL "lilygo-tdongle-s3")
set(TACTILITY_BOARD_PROJECT LilygoTdongleS3)
elseif (board_id STREQUAL "lilygo-tlora-pager")
set(TACTILITY_BOARD_PROJECT LilygoTLoraPager)
elseif (board_id STREQUAL "m5stack-cardputer")
set(TACTILITY_BOARD_PROJECT M5stackCardputer)
elseif (board_id STREQUAL "m5stack-cardputer-adv")
set(TACTILITY_BOARD_PROJECT M5stackCardputerAdv)
elseif (board_id STREQUAL "m5stack-core2")
set(TACTILITY_BOARD_PROJECT M5stackCore2)
elseif (board_id STREQUAL "m5stack-cores3")
set(TACTILITY_BOARD_PROJECT M5stackCoreS3)
elseif (board_id STREQUAL "m5stack-stickc-plus")
set(TACTILITY_BOARD_PROJECT M5stackStickCPlus)
elseif (board_id STREQUAL "m5stack-stickc-plus2")
set(TACTILITY_BOARD_PROJECT M5stackStickCPlus2)
elseif (board_id STREQUAL "unphone")
set(TACTILITY_BOARD_PROJECT UnPhone)
elseif (board_id STREQUAL "waveshare-s3-touch-43")
set(TACTILITY_BOARD_PROJECT WaveshareS3Touch43)
elseif (board_id STREQUAL "waveshare-s3-touch-lcd-147")
set(TACTILITY_BOARD_PROJECT WaveshareS3TouchLcd147)
elseif (board_id STREQUAL "waveshare-s3-touch-lcd-128")
set(TACTILITY_BOARD_PROJECT WaveshareS3TouchLcd128)
elseif (board_id STREQUAL "waveshare-s3-lcd-13")
set(TACTILITY_BOARD_PROJECT WaveshareS3Lcd13)
else ()
set(TACTILITY_BOARD_PROJECT "")
endif ()
if (TACTILITY_BOARD_PROJECT STREQUAL "")
message(FATAL_ERROR "No subproject mapped to \"${TACTILITY_BOARD_ID}\" in root Buildscripts/board.cmake")
else ()
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})
endif ()
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()