build: clean up the mess of ifdefs from platform into a scons-configured hal

This commit is contained in:
Torrie Fischer
2023-12-20 10:47:26 +01:00
parent 236795917a
commit 23993a09cf
21 changed files with 376 additions and 410 deletions

9
build-hal.py Normal file
View File

@@ -0,0 +1,9 @@
Import("env")
board = env.get("BOARD_MCU")
frameworks = env.get("PIOFRAMEWORK")
print(f"HAL configuration:")
for framework in frameworks:
env.Append(SRC_FILTER=[f"+<platform/{framework}/{board}/*>"])
env.Append(SRC_FILTER=[f"+<platform/{framework}/*.cpp>"])
print(f"- platform/{framework}{board}")