unleashed-firmware/site_scons/commandline.scons
hedger 9bf11d9fd2
[FL-2859,2838] fbt: improvements for FAPs (#1813)
* fbt: assets builder for apps WIP
* fbt: automatically building private fap assets
* docs: details on how to use image assets
* fbt: renamed fap_assets -> fap_icons
* fbt: support for fap_extbuild field
* docs: info on fap_extbuild
* fbt: added --proxy-env parame ter
* fbt: made firmware_cdb & updater_cdb targets always available
* fbt: renamed fap_icons -> fap_icon_assets
* fbt: deprecated firmware_* target names for faps; new alias is "fap_APPID"
* fbt: changed intermediate file locations for external apps
* fbt: support for fap_private_libs; docs: updates
* restored mbedtls as global lib
* scripts: lint.py: skip "lib" subfolder
* fbt: Sanity checks for building advanced faps as part of fw
* docs: info on fap_private_libs; fbt: optimized *.fam indexing
* fbt: cleanup; samples: added sample_icons app
* fbt: moved example app to applications/examples
* linter fix
* docs: readme fixes
* added applications/examples/application.fam stub
* docs: more info on private libs

Co-authored-by: あく <alleteam@gmail.com>
2022-10-06 22:55:57 +09:00

246 lines
5.1 KiB
Text

# Commandline options
# To build updater-related targets, you need to set this option
AddOption(
"--with-updater",
dest="fullenv",
action="store_true",
help="Full firmware environment",
)
AddOption(
"--options",
dest="optionfile",
type="string",
nargs=1,
action="store",
default="fbt_options.py",
help="Enviroment option file",
)
AddOption(
"--extra-int-apps",
action="store",
dest="extra_int_apps",
default="",
help="List of applications to add to firmare's built-ins. Also see FIRMWARE_APP_SET and FIRMWARE_APPS",
)
AddOption(
"--extra-ext-apps",
action="store",
dest="extra_ext_apps",
default="",
help="List of applications to forcefully build as standalone .elf",
)
AddOption(
"--proxy-env",
action="store",
dest="proxy_env",
default="",
help="Comma-separated list of additional environment variables to pass to child SCons processes",
)
# Construction environment variables
vars = Variables(GetOption("optionfile"), ARGUMENTS)
vars.AddVariables(
BoolVariable(
"VERBOSE",
help="Print full commands",
default=False,
),
BoolVariable(
"FORCE",
help="Force target action (for supported targets)",
default=False,
),
BoolVariable(
"DEBUG",
help="Enable debug build",
default=True,
),
BoolVariable(
"COMPACT",
help="Optimize for size",
default=False,
),
EnumVariable(
"TARGET_HW",
help="Hardware target",
default="7",
allowed_values=[
"7",
],
),
BoolVariable(
"DEBUG_TOOLS",
help="Enable debug tools to be built",
default=False,
),
)
vars.Add(
"DIST_SUFFIX",
help="Suffix for binaries in build output for dist targets",
default="local",
)
vars.Add(
"UPDATE_VERSION_STRING",
help="Version string for updater package",
default="${DIST_SUFFIX}",
)
vars.Add(
"COPRO_CUBE_VERSION",
help="Cube version",
default="",
)
vars.Add(
"COPRO_STACK_ADDR",
help="Core2 Firmware address",
default="0",
)
vars.Add(
"COPRO_STACK_BIN",
help="Core2 Firmware file name",
default="",
)
vars.Add(
"COPRO_DISCLAIMER",
help="Value to pass to bundling script to confirm dangerous operations",
default="",
)
vars.AddVariables(
PathVariable(
"COPRO_OB_DATA",
help="Path to OB reference data",
validator=PathVariable.PathIsFile,
default="",
),
PathVariable(
"COPRO_STACK_BIN_DIR",
help="Path to ST-provided stacks",
validator=PathVariable.PathIsDir,
default="",
),
PathVariable(
"COPRO_CUBE_DIR",
help="Path to Cube root",
validator=PathVariable.PathIsDir,
default="",
),
EnumVariable(
"COPRO_STACK_TYPE",
help="Core2 stack type",
default="ble_light",
allowed_values=[
"ble_full",
"ble_light",
"ble_basic",
],
),
PathVariable(
"SVD_FILE",
help="Path to SVD file",
validator=PathVariable.PathIsFile,
default="",
),
PathVariable(
"OTHER_ELF",
help="Path to prebuilt ELF file to debug",
validator=PathVariable.PathAccept,
default="",
),
)
vars.Add(
"FBT_TOOLCHAIN_VERSIONS",
help="Whitelisted toolchain versions (leave empty for no check)",
default=tuple(),
)
vars.Add(
"OPENOCD_OPTS",
help="Options to pass to OpenOCD",
default="",
)
vars.Add(
"BLACKMAGIC",
help="Blackmagic probe location",
default="auto",
)
vars.Add(
"UPDATE_SPLASH",
help="Directory name with slideshow frames to render after installing update package",
default="update_default",
)
vars.Add(
"LOADER_AUTOSTART",
help="Application name to automatically run on Flipper boot",
default="",
)
vars.Add(
"FIRMWARE_APPS",
help="Map of (configuration_name->application_list)",
default={
"default": (
# Svc
"basic_services",
# Apps
"main_apps",
"system_apps",
# Settings
"settings_apps",
# Plugins
# "basic_plugins",
# Debug
# "debug_apps",
)
},
)
vars.Add(
"FIRMWARE_APP_SET",
help="Application set to use from FIRMWARE_APPS",
default="default",
)
vars.Add(
"APPSRC",
help="Application source directory for app to build & upload",
default="",
)
# List of tuples (directory, add_to_global_include_path)
vars.Add(
"APPDIRS",
help="Directories to search for firmware components & external apps",
default=[
("applications", False),
("applications/services", True),
("applications/main", True),
("applications/settings", False),
("applications/system", False),
("applications/debug", False),
("applications/plugins", False),
("applications/examples", False),
("applications_user", False),
],
)
Return("vars")