mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-27 15:00:46 +00:00
890c9e87ce
* examples: plugins: utilize fal_embedded * libs: removed fnv1a_hash * furi: added FURI_PACKED; apps, libs: changed to use FURI_PACKED * lib: mbedtls: using custom config * lib: toolbox: removed md5, switched to mbedtls * targets: f18: link fix * lib: added mbedtls_cfg.h * apps: nfc: explicit dependency on libmbedtls * u2f: reworking to mbedtls * u2f: replaced sha256 & hmac with mbedtls * u2f: functional rework using mbedtls * libs: dropped micro-ecc * u2f: dropped old implementation * toolbox: removed sha256 impl * mcheck() for mbedtls * libs: removed libmisc; split into smaller libs * apps: debug: fixed display_test * apps: include cleanups * fbt: fixed VERSIONCOMSTR * furi: added FURI_CHECK_RETURN * lib: removed qrcode * cleanup * fbt: lint_py+format_py: fixed excessive command length * api: Removed bzero from f7 * api: Removed bzero from f18 * Bump API Symbols Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
116 lines
2.2 KiB
Python
116 lines
2.2 KiB
Python
Import("env")
|
|
|
|
wrapped_fn_list = [
|
|
#
|
|
# used by our firmware, so we provide their realizations
|
|
#
|
|
"fflush",
|
|
"printf",
|
|
"putc", # fallback from printf, thanks gcc
|
|
"putchar", # storage cli
|
|
"puts", # fallback from printf, thanks gcc
|
|
"snprintf",
|
|
"vsnprintf", # m-string
|
|
"__assert", # ???
|
|
"__assert_func", # ???
|
|
#
|
|
# wrap other functions to make sure they are not called
|
|
# realization is not provided
|
|
#
|
|
"setbuf",
|
|
"setvbuf",
|
|
"fprintf",
|
|
"vfprintf",
|
|
"vprintf",
|
|
"fputc",
|
|
"fputs",
|
|
"sprintf", # specially, because this function is dangerous
|
|
"asprintf",
|
|
"vasprintf",
|
|
"asiprintf",
|
|
"asniprintf",
|
|
"asnprintf",
|
|
"diprintf",
|
|
"fiprintf",
|
|
"iprintf",
|
|
"siprintf",
|
|
"sniprintf",
|
|
"vasiprintf",
|
|
"vasniprintf",
|
|
"vasnprintf",
|
|
"vdiprintf",
|
|
"vfiprintf",
|
|
"viprintf",
|
|
"vsiprintf",
|
|
"vsniprintf",
|
|
#
|
|
# Scanf is not implemented 4 now
|
|
#
|
|
# "fscanf",
|
|
# "scanf",
|
|
# "sscanf",
|
|
# "vsprintf",
|
|
# "fgetc",
|
|
# "fgets",
|
|
# "getc",
|
|
# "getchar",
|
|
# "gets",
|
|
# "ungetc",
|
|
# "vfscanf",
|
|
# "vscanf",
|
|
# "vsscanf",
|
|
# "fiscanf",
|
|
# "iscanf",
|
|
# "siscanf",
|
|
# "vfiscanf",
|
|
# "viscanf",
|
|
# "vsiscanf",
|
|
#
|
|
# File management
|
|
#
|
|
# "fclose",
|
|
# "freopen",
|
|
# "fread",
|
|
# "fwrite",
|
|
# "fgetpos",
|
|
# "fseek",
|
|
# "fsetpos",
|
|
# "ftell",
|
|
# "rewind",
|
|
# "feof",
|
|
# "ferror",
|
|
# "fopen",
|
|
# "remove",
|
|
# "rename",
|
|
# "fseeko",
|
|
# "ftello",
|
|
]
|
|
|
|
for wrapped_fn in wrapped_fn_list:
|
|
env.Append(
|
|
LINKFLAGS=[
|
|
"-Wl,--wrap," + wrapped_fn,
|
|
"-Wl,--wrap," + wrapped_fn + "_unlocked",
|
|
"-Wl,--wrap,_" + wrapped_fn + "_r",
|
|
"-Wl,--wrap,_" + wrapped_fn + "_unlocked_r",
|
|
]
|
|
)
|
|
|
|
env.Append(
|
|
SDK_HEADERS=[
|
|
File("wrappers.h"),
|
|
],
|
|
LINT_SOURCES=[
|
|
Dir("."),
|
|
],
|
|
)
|
|
|
|
libenv = env.Clone(FW_LIB_NAME="print")
|
|
libenv.ApplyLibFlags()
|
|
libenv.Append(CCFLAGS=["-Wno-double-promotion"])
|
|
|
|
sources = libenv.GlobRecursive("*.c*", ".")
|
|
|
|
lib = libenv.StaticLibrary("${FW_LIB_NAME}", sources)
|
|
libenv.Install("${LIB_DIST_DIR}", lib)
|
|
Return("lib")
|