Create DTS files for all devices and implement I2C changes (#466)
Devictree changes: - Create DTS files for all remaining devices - Update corresponding `devicetree.yaml` - Remove `i2c` configuration from corresponding `tt::hal::Configuration` Apps & HAL: - Removed I2C Settings (we'll make a new one later after I rework that part of the HAL) - Delete TactilityC GPIO and I2C functionality - Delete Related SystemEvent types - Refactor `tt::hal::i2c` to only use `struct Device*` wrapping Scripting: - Fix DevicetreeCompiler boolean parsing - Create `build-all.py`
This commit is contained in:
committed by
GitHub
parent
71f8369377
commit
87ca888bb4
@@ -33,8 +33,8 @@ class DtsTransformer(Transformer):
|
||||
return Device(identifier, properties, devices)
|
||||
def device_property(self, objects: List[object]):
|
||||
name = objects[0]
|
||||
if len(objects) == 1:
|
||||
# Boolean property with no value
|
||||
# Boolean property has no value as the value is implied to be true
|
||||
if (len(objects) == 1) or (objects[1] is None):
|
||||
return DeviceProperty(name, "boolean", True)
|
||||
if type(objects[1]) is not PropertyValue:
|
||||
raise Exception(f"Object was not converted to PropertyValue: {objects[1]}")
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
import os
|
||||
import subprocess
|
||||
import shutil
|
||||
import time
|
||||
|
||||
def build(device: str) -> bool:
|
||||
print(f"Building {device}...")
|
||||
shutil.rmtree(os.path.join('Firmware', 'Generated'), ignore_errors=True)
|
||||
result = subprocess.run(['python', 'device.py', device], capture_output=True, text=True)
|
||||
if result.returncode != 0:
|
||||
print(f"Failed to select device {device}")
|
||||
return False
|
||||
result = subprocess.run(['idf.py', f"-Bbuild-all-{device}", 'build'], capture_output=True, text=True)
|
||||
if result.returncode != 0:
|
||||
print(f"Build failed for {device}:")
|
||||
print(result.stdout)
|
||||
print(result.stderr)
|
||||
return result.returncode == 0
|
||||
|
||||
def main():
|
||||
start_time = time.time()
|
||||
buildscripts_dir = 'Devices'
|
||||
if not os.path.exists(buildscripts_dir):
|
||||
print(f"Directory '{buildscripts_dir}' not found.")
|
||||
return
|
||||
|
||||
for item in os.listdir(buildscripts_dir):
|
||||
item_path = os.path.join(buildscripts_dir, item)
|
||||
if os.path.isdir(item_path) and item != 'simulator':
|
||||
if not build(item):
|
||||
return
|
||||
|
||||
print("All builds succeeded.")
|
||||
end_time = time.time()
|
||||
print(f"Elapsed time: {end_time - start_time:.2f} seconds")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user