mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-08-21 17:35:06 +00:00
Fixes and cleanup
This commit is contained in:
parent
a96fd77986
commit
26a8aa26c2
@ -7,7 +7,6 @@ idf_component_register(
|
|||||||
"Libraries/minmea/include"
|
"Libraries/minmea/include"
|
||||||
"Libraries/minitar/include"
|
"Libraries/minitar/include"
|
||||||
"Modules/lvgl-module/include"
|
"Modules/lvgl-module/include"
|
||||||
# DRIVER_INCLUDE_DIRS_PLACEHOLDER
|
|
||||||
REQUIRES esp_timer app-module crypt-module gps-module lvgl-module lvgl-window-manager-module service-module
|
REQUIRES esp_timer app-module crypt-module gps-module lvgl-module lvgl-window-manager-module service-module
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,6 @@ macro(tactility_project project_name)
|
|||||||
set(EXTRA_COMPONENT_DIRS
|
set(EXTRA_COMPONENT_DIRS
|
||||||
"${TACTILITY_SDK_PATH}/Libraries/TactilityFreeRtos"
|
"${TACTILITY_SDK_PATH}/Libraries/TactilityFreeRtos"
|
||||||
"${TACTILITY_SDK_PATH}/Modules"
|
"${TACTILITY_SDK_PATH}/Modules"
|
||||||
"${TACTILITY_SDK_PATH}/Drivers"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(COMPONENTS
|
set(COMPONENTS
|
||||||
@ -31,7 +30,6 @@ macro(tactility_project project_name)
|
|||||||
lvgl-module
|
lvgl-module
|
||||||
lvgl-window-manager-module
|
lvgl-window-manager-module
|
||||||
service-module
|
service-module
|
||||||
# DRIVER_COMPONENTS_PLACEHOLDER
|
|
||||||
)
|
)
|
||||||
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|||||||
@ -111,43 +111,13 @@ def add_module(target_path, module_name):
|
|||||||
cmakelists_content = create_module_cmakelists(module_name)
|
cmakelists_content = create_module_cmakelists(module_name)
|
||||||
write_module_cmakelists(os.path.join(target_path, f"Modules/{module_name}/CMakeLists.txt"), cmakelists_content)
|
write_module_cmakelists(os.path.join(target_path, f"Modules/{module_name}/CMakeLists.txt"), cmakelists_content)
|
||||||
|
|
||||||
def discover_all_drivers():
|
def generate_tactility_sdk_cmake(target_path):
|
||||||
"""
|
|
||||||
Discover all *-module directories under Drivers/ (not Modules/ - those are handled
|
|
||||||
separately via add_module). Sorted for deterministic output across OS/filesystem order.
|
|
||||||
"""
|
|
||||||
pattern = os.path.join('Drivers', '*-module')
|
|
||||||
return sorted(
|
|
||||||
os.path.basename(p) for p in glob.glob(pattern) if os.path.isdir(p)
|
|
||||||
)
|
|
||||||
|
|
||||||
def generate_tactility_sdk_cmake(target_path, available_drivers):
|
|
||||||
src = os.path.join('Buildscripts', 'TactilitySDK', 'TactilitySDK.cmake')
|
src = os.path.join('Buildscripts', 'TactilitySDK', 'TactilitySDK.cmake')
|
||||||
with open(src) as f:
|
shutil.copy2(src, os.path.join(target_path, 'TactilitySDK.cmake'))
|
||||||
content = f.read()
|
|
||||||
placeholder = " # DRIVER_COMPONENTS_PLACEHOLDER"
|
|
||||||
assert placeholder in content, \
|
|
||||||
f"Placeholder '{placeholder.strip()}' not found in {src} - template drifted, generator needs updating"
|
|
||||||
components = "\n".join(f" {d}" for d in available_drivers)
|
|
||||||
new_content = content.replace(placeholder, components)
|
|
||||||
assert placeholder not in new_content, \
|
|
||||||
f"Placeholder '{placeholder.strip()}' still present after replacement in {src}"
|
|
||||||
with open(os.path.join(target_path, 'TactilitySDK.cmake'), 'w') as f:
|
|
||||||
f.write(new_content)
|
|
||||||
|
|
||||||
def generate_tactility_sdk_top_cmakelists(target_path, available_drivers):
|
def generate_tactility_sdk_top_cmakelists(target_path):
|
||||||
src = os.path.join('Buildscripts', 'TactilitySDK', 'CMakeLists.txt')
|
src = os.path.join('Buildscripts', 'TactilitySDK', 'CMakeLists.txt')
|
||||||
with open(src) as f:
|
shutil.copy2(src, os.path.join(target_path, 'CMakeLists.txt'))
|
||||||
content = f.read()
|
|
||||||
placeholder = " # DRIVER_INCLUDE_DIRS_PLACEHOLDER"
|
|
||||||
assert placeholder in content, \
|
|
||||||
f"Placeholder '{placeholder.strip()}' not found in {src} - template drifted, generator needs updating"
|
|
||||||
include_dirs = "\n".join(f' "Drivers/{d}/include"' for d in available_drivers)
|
|
||||||
new_content = content.replace(placeholder, include_dirs)
|
|
||||||
assert placeholder not in new_content, \
|
|
||||||
f"Placeholder '{placeholder.strip()}' still present after replacement in {src}"
|
|
||||||
with open(os.path.join(target_path, 'CMakeLists.txt'), 'w') as f:
|
|
||||||
f.write(new_content)
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if len(sys.argv) < 2:
|
if len(sys.argv) < 2:
|
||||||
@ -208,16 +178,9 @@ def main():
|
|||||||
add_module(target_path, "lvgl-window-manager-module")
|
add_module(target_path, "lvgl-window-manager-module")
|
||||||
add_module(target_path, "service-module")
|
add_module(target_path, "service-module")
|
||||||
|
|
||||||
# Drivers - only ones actually built for this target (chip-restricted drivers like
|
# Final scripts - copied verbatim
|
||||||
# sc2356-module won't have a .a outside ESP32-P4)
|
generate_tactility_sdk_cmake(target_path)
|
||||||
available_drivers = [d for d in discover_all_drivers() if driver_is_available(d)]
|
generate_tactility_sdk_top_cmakelists(target_path)
|
||||||
for driver_name in available_drivers:
|
|
||||||
add_driver(target_path, driver_name)
|
|
||||||
|
|
||||||
# Final scripts - generated (not copied verbatim) so COMPONENTS/INCLUDE_DIRS only list
|
|
||||||
# drivers actually available for this target
|
|
||||||
generate_tactility_sdk_cmake(target_path, available_drivers)
|
|
||||||
generate_tactility_sdk_top_cmakelists(target_path, available_drivers)
|
|
||||||
|
|
||||||
# Output ESP-IDF SDK version to file
|
# Output ESP-IDF SDK version to file
|
||||||
esp_idf_version = os.environ.get("ESP_IDF_VERSION", "")
|
esp_idf_version = os.environ.get("ESP_IDF_VERSION", "")
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
## Higher Priority
|
## Higher Priority
|
||||||
|
|
||||||
|
- Make it more clear to end-users that an SD card is required to run Tactility
|
||||||
- Move "# Fix error "PSRAM space not enough for the Flash instructions" on boot:" fix from T-Deck and others to device.py
|
- Move "# Fix error "PSRAM space not enough for the Flash instructions" on boot:" fix from T-Deck and others to device.py
|
||||||
- Make it possible to override stack size for an app via config file (loaded at boot), and make it possible to set preferred memory location (e.g. internal/external)
|
- Make it possible to override stack size for an app via config file (loaded at boot), and make it possible to set preferred memory location (e.g. internal/external)
|
||||||
- Put task stacks in PSRAM when possible.
|
- Put task stacks in PSRAM when possible.
|
||||||
@ -52,6 +53,7 @@
|
|||||||
|
|
||||||
## Medium Priority
|
## Medium Priority
|
||||||
|
|
||||||
|
- Consider moving certain drivers into separate modules: audio, bt, wifi, etc
|
||||||
- Consider using https://github.com/Graphify-Labs/graphify
|
- Consider using https://github.com/Graphify-Labs/graphify
|
||||||
- Consider implementing LVGL gridnav in apps https://lvgl.io/docs/open/9.3/details/auxiliary-modules/gridnav.html
|
- Consider implementing LVGL gridnav in apps https://lvgl.io/docs/open/9.3/details/auxiliary-modules/gridnav.html
|
||||||
- Implement a LED kernel driver (single colour and RGB, plain GPIO and PWM)
|
- Implement a LED kernel driver (single colour and RGB, plain GPIO and PWM)
|
||||||
|
|||||||
@ -3,11 +3,5 @@ file(GLOB_RECURSE SOURCE_FILES Source/*.c)
|
|||||||
idf_component_register(
|
idf_component_register(
|
||||||
SRCS ${SOURCE_FILES}
|
SRCS ${SOURCE_FILES}
|
||||||
REQUIRES TactilitySDK
|
REQUIRES TactilitySDK
|
||||||
lvgl-module
|
app-module crypt-module gps-module lvgl-module lvgl-window-manager-module service-module
|
||||||
bm8563-module
|
|
||||||
bmi270-module
|
|
||||||
mpu6886-module
|
|
||||||
pi4ioe5v6408-module
|
|
||||||
qmi8658-module
|
|
||||||
rx8130ce-module
|
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user