mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
build system work in progress
This commit is contained in:
parent
3dfc27e93e
commit
2952100836
1
ExternalApps/HelloWorld/.gitignore
vendored
Normal file
1
ExternalApps/HelloWorld/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
build*/
|
||||
@ -1,6 +0,0 @@
|
||||
rm sdkconfig
|
||||
cp ../../sdkconfig sdkconfig
|
||||
cat sdkconfig.override >> sdkconfig
|
||||
# First we must run "build" because otherwise "idf.py elf" is not a valid command
|
||||
idf.py build
|
||||
idf.py elf
|
||||
34
ExternalApps/HelloWorld/sdkconfig.esp32
Normal file
34
ExternalApps/HelloWorld/sdkconfig.esp32
Normal file
@ -0,0 +1,34 @@
|
||||
# LVGL defaults (must match with OS)
|
||||
CONFIG_LV_FONT_MONTSERRAT_14=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_18=y
|
||||
CONFIG_LV_USE_USER_DATA=y
|
||||
CONFIG_LV_USE_FS_STDIO=y
|
||||
CONFIG_LV_FS_STDIO_LETTER=65
|
||||
CONFIG_LV_FS_STDIO_PATH=""
|
||||
CONFIG_LV_FS_STDIO_CACHE_SIZE=4096
|
||||
CONFIG_LV_USE_LODEPNG=y
|
||||
CONFIG_LV_USE_BUILTIN_MALLOC=n
|
||||
CONFIG_LV_USE_CLIB_MALLOC=y
|
||||
CONFIG_LV_USE_MSGBOX=n
|
||||
CONFIG_LV_USE_SPINNER=n
|
||||
CONFIG_LV_USE_WIN=n
|
||||
CONFIG_LV_USE_SNAPSHOT=y
|
||||
|
||||
# FreeRTOS defaults (must match wit OS)
|
||||
CONFIG_FREERTOS_HZ=1000
|
||||
CONFIG_FREERTOS_TASK_NOTIFICATION_ARRAY_ENTRIES=2
|
||||
CONFIG_FREERTOS_SMP=n
|
||||
CONFIG_FREERTOS_UNICORE=n
|
||||
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=4096
|
||||
CONFIG_FREERTOS_USE_TRACE_FACILITY=y
|
||||
|
||||
# FatFS defaults (must match with OS)
|
||||
CONFIG_FATFS_LFN_HEAP=y
|
||||
CONFIG_FATFS_VOLUME_COUNT=3
|
||||
|
||||
# App-specific
|
||||
CONFIG_PARTITION_TABLE_SINGLE_APP=y
|
||||
CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK=n
|
||||
|
||||
# Platform
|
||||
CONFIG_IDF_TARGET_ESP32=y
|
||||
34
ExternalApps/HelloWorld/sdkconfig.esp32s3
Normal file
34
ExternalApps/HelloWorld/sdkconfig.esp32s3
Normal file
@ -0,0 +1,34 @@
|
||||
# LVGL defaults (must match with OS)
|
||||
CONFIG_LV_FONT_MONTSERRAT_14=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_18=y
|
||||
CONFIG_LV_USE_USER_DATA=y
|
||||
CONFIG_LV_USE_FS_STDIO=y
|
||||
CONFIG_LV_FS_STDIO_LETTER=65
|
||||
CONFIG_LV_FS_STDIO_PATH=""
|
||||
CONFIG_LV_FS_STDIO_CACHE_SIZE=4096
|
||||
CONFIG_LV_USE_LODEPNG=y
|
||||
CONFIG_LV_USE_BUILTIN_MALLOC=n
|
||||
CONFIG_LV_USE_CLIB_MALLOC=y
|
||||
CONFIG_LV_USE_MSGBOX=n
|
||||
CONFIG_LV_USE_SPINNER=n
|
||||
CONFIG_LV_USE_WIN=n
|
||||
CONFIG_LV_USE_SNAPSHOT=y
|
||||
|
||||
# FreeRTOS defaults (must match wit OS)
|
||||
CONFIG_FREERTOS_HZ=1000
|
||||
CONFIG_FREERTOS_TASK_NOTIFICATION_ARRAY_ENTRIES=2
|
||||
CONFIG_FREERTOS_SMP=n
|
||||
CONFIG_FREERTOS_UNICORE=n
|
||||
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=4096
|
||||
CONFIG_FREERTOS_USE_TRACE_FACILITY=y
|
||||
|
||||
# FatFS defaults (must match with OS)
|
||||
CONFIG_FATFS_LFN_HEAP=y
|
||||
CONFIG_FATFS_VOLUME_COUNT=3
|
||||
|
||||
# App-specific
|
||||
CONFIG_PARTITION_TABLE_SINGLE_APP=y
|
||||
CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK=n
|
||||
|
||||
# Platform
|
||||
CONFIG_IDF_TARGET_ESP32S3=y
|
||||
@ -1,2 +0,0 @@
|
||||
CONFIG_PARTITION_TABLE_SINGLE_APP=y
|
||||
CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK=n
|
||||
58
ExternalApps/HelloWorld/ttbuild.py
Normal file
58
ExternalApps/HelloWorld/ttbuild.py
Normal file
@ -0,0 +1,58 @@
|
||||
import sys
|
||||
import os
|
||||
|
||||
def printWarning(message):
|
||||
if sys.platform == 'win32':
|
||||
print(f"ERROR: {message}")
|
||||
else:
|
||||
print(f"\033[93mWARNING: {message}\033[m")
|
||||
|
||||
def printError(message):
|
||||
if sys.platform == 'win32':
|
||||
print(f"ERROR: {message}")
|
||||
else:
|
||||
print(f"\033[91mERROR: {message}\033[m")
|
||||
|
||||
def exitWithError(message):
|
||||
printError(message)
|
||||
sys.exit(1)
|
||||
|
||||
def isValidPlatformName(name):
|
||||
return name == "all" or name == "esp32" or name == "esp32s3"
|
||||
|
||||
def build(platformName):
|
||||
print(f"Platform: {platformName}")
|
||||
os.system(f"cp sdkconfig.{platformName} sdkconfig")
|
||||
os.system(f"idf.py -B build-{platformName} build")
|
||||
|
||||
def buildAll():
|
||||
build("esp32")
|
||||
build("esp32s3")
|
||||
|
||||
def printHelp():
|
||||
print("Usage:")
|
||||
print("\tpython ttbuild.py [platformName]")
|
||||
print("\tplatformName: all|esp32|esp32s3")
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("Tactility Build System v0.1.0")
|
||||
# Environment
|
||||
if os.environ.get('IDF_PATH') == None:
|
||||
exitWithError("IDF is not installed or activated. Ensure you installed the toolset and ran the export command.")
|
||||
if os.environ.get('TACTILITY_SDK_PATH') != None:
|
||||
printWarning("TACTILITY_SDK_PATH is set, but will be ignored by this command")
|
||||
os.environ['TACTILITY_SDK_PATH'] = '../../release/TactilitySDK'
|
||||
# Argument validation
|
||||
if len(sys.argv) == 1:
|
||||
printHelp()
|
||||
sys.exit()
|
||||
platformName = sys.argv[1]
|
||||
if not isValidPlatformName(platformName):
|
||||
printHelp()
|
||||
exitWithError("Invalid platform name")
|
||||
# Build
|
||||
if platformName == "all":
|
||||
buildAll()
|
||||
else:
|
||||
build(sys.argv[1])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user