fbt fixes for mfbt pt2 (#1951)

* fbt: split sdk management code
* scripts: fixed import handling
* fbt: sdk: reformatted paths
* scrips: dist: bundling libs as a build artifact
* fbt: sdk: better path management
* typo fix
* fbt: sdk: minor path handling fixes
* toolchain: fixed windows toolchain download
* fbt: minor refactorin
* fbt: moved sdk management code to extapps.scons
* fbt: fixed sdk symbols header path; disabled -fstack-usage
* fbt: changed pathing for .py scripts
* fbt: changed SDK_HEADERS pathing; added libusb to SDK; added icon_i.h to SDK; added hw target to SDK meta
* fbt: added libusb headers to SDK
* picopass: include cleanup; api: added subghz/registry.h; api: added mbedtls to exported headers
* picopass: fixed formatting
* fbt: fixed COPRO_ASSETS_SCRIPT
* sdk: added basic infrared apis
* toolchain: added ufbt to list of legal fbtenv callers; updated error messages
* fbt: changed manifest collection & icon processing code
* fbt: simpler srcdir lookup
* toolchain: path management fixes; fbt: fixes for fap private libs paths
* scripts: toolchain: reworked download on Windows
* toolchain: v17
* scripts: added colorlog for logging
* Github: fix unit tests

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
hedger
2022-11-02 19:15:40 +04:00
committed by GitHub
parent abfa804ae0
commit ebc2b66372
42 changed files with 459 additions and 235 deletions

View File

@@ -17,12 +17,12 @@ env.Append(
"lib/print",
],
SDK_HEADERS=[
File("#/lib/one_wire/one_wire_host_timing.h"),
File("#/lib/one_wire/one_wire_host.h"),
File("#/lib/one_wire/one_wire_slave.h"),
File("#/lib/one_wire/one_wire_device.h"),
File("#/lib/one_wire/ibutton/ibutton_worker.h"),
File("#/lib/one_wire/maxim_crc.h"),
File("one_wire/one_wire_host_timing.h"),
File("one_wire/one_wire_host.h"),
File("one_wire/one_wire_slave.h"),
File("one_wire/one_wire_device.h"),
File("one_wire/ibutton/ibutton_worker.h"),
File("one_wire/maxim_crc.h"),
],
)

View File

@@ -15,7 +15,7 @@ env.Append(
],
SDK_HEADERS=env.GlobRecursive(
"*_ll_*.h",
"#/lib/STM32CubeWB/Drivers/STM32WBxx_HAL_Driver/Inc/",
Dir("STM32CubeWB/Drivers/STM32WBxx_HAL_Driver/Inc/"),
exclude="*usb.h",
),
)

View File

@@ -5,7 +5,7 @@ env.Append(
"#/lib/flipper_application",
],
SDK_HEADERS=[
File("#/lib/flipper_application/flipper_application.h"),
File("flipper_application.h"),
],
)

View File

@@ -5,8 +5,8 @@ env.Append(
"#/lib/flipper_format",
],
SDK_HEADERS=[
File("#/lib/flipper_format/flipper_format.h"),
File("#/lib/flipper_format/flipper_format_i.h"),
File("flipper_format.h"),
File("flipper_format_i.h"),
],
)

View File

@@ -5,6 +5,11 @@ env.Append(
"#/lib/infrared/encoder_decoder",
"#/lib/infrared/worker",
],
SDK_HEADERS=[
File("encoder_decoder/infrared.h"),
File("worker/infrared_worker.h"),
File("worker/infrared_transmit.h"),
],
)

View File

@@ -8,12 +8,12 @@ env.Append(
"#/lib/lfrfid",
],
SDK_HEADERS=[
File("#/lib/lfrfid/lfrfid_worker.h"),
File("#/lib/lfrfid/lfrfid_raw_worker.h"),
File("#/lib/lfrfid/lfrfid_raw_file.h"),
File("#/lib/lfrfid/lfrfid_dict_file.h"),
File("#/lib/lfrfid/tools/bit_lib.h"),
File("#/lib/lfrfid/protocols/lfrfid_protocols.h"),
File("lfrfid_worker.h"),
File("lfrfid_raw_worker.h"),
File("lfrfid_raw_file.h"),
File("lfrfid_dict_file.h"),
File("tools/bit_lib.h"),
File("protocols/lfrfid_protocols.h"),
],
)

View File

@@ -7,6 +7,10 @@ env.Append(
CPPDEFINES=[
("USB_PMASIZE", "0x400"),
],
SDK_HEADERS=env.GlobRecursive(
"*.h",
Dir("libusb_stm32/inc"),
),
)

View File

@@ -5,6 +5,10 @@ env.Append(
"#/lib/mbedtls",
"#/lib/mbedtls/include",
],
SDK_HEADERS=[
File("mbedtls/include/mbedtls/des.h"),
File("mbedtls/include/mbedtls/sha1.h"),
],
)

View File

@@ -13,7 +13,7 @@ env.Append(
"PB_ENABLE_MALLOC",
],
SDK_HEADERS=[
File("#/lib/micro-ecc/uECC.h"),
File("micro-ecc/uECC.h"),
],
)

View File

@@ -98,7 +98,7 @@ for wrapped_fn in wrapped_fn_list:
env.Append(
SDK_HEADERS=[
File("#/lib/print/wrappers.h"),
File("wrappers.h"),
],
)

View File

@@ -5,18 +5,19 @@ env.Append(
"#/lib/subghz",
],
SDK_HEADERS=[
File("#/lib/subghz/environment.h"),
File("#/lib/subghz/receiver.h"),
File("#/lib/subghz/subghz_worker.h"),
File("#/lib/subghz/subghz_tx_rx_worker.h"),
File("#/lib/subghz/transmitter.h"),
File("#/lib/subghz/protocols/raw.h"),
File("#/lib/subghz/blocks/const.h"),
File("#/lib/subghz/blocks/decoder.h"),
File("#/lib/subghz/blocks/encoder.h"),
File("#/lib/subghz/blocks/generic.h"),
File("#/lib/subghz/blocks/math.h"),
File("#/lib/subghz/subghz_setting.h"),
File("environment.h"),
File("receiver.h"),
File("registry.h"),
File("subghz_worker.h"),
File("subghz_tx_rx_worker.h"),
File("transmitter.h"),
File("protocols/raw.h"),
File("blocks/const.h"),
File("blocks/decoder.h"),
File("blocks/encoder.h"),
File("blocks/generic.h"),
File("blocks/math.h"),
File("subghz_setting.h"),
],
)

View File

@@ -2,6 +2,10 @@
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct SubGhzEnvironment SubGhzEnvironment;
typedef struct SubGhzProtocolRegistry SubGhzProtocolRegistry;
@@ -37,3 +41,7 @@ const SubGhzProtocol* subghz_protocol_registry_get_by_index(
* @return Number of protocols
*/
size_t subghz_protocol_registry_count(const SubGhzProtocolRegistry* protocol_registry);
#ifdef __cplusplus
}
#endif

View File

@@ -8,23 +8,23 @@ env.Append(
"#/lib/toolbox",
],
SDK_HEADERS=[
File("#/lib/toolbox/manchester_decoder.h"),
File("#/lib/toolbox/manchester_encoder.h"),
File("#/lib/toolbox/path.h"),
File("#/lib/toolbox/random_name.h"),
File("#/lib/toolbox/hmac_sha256.h"),
File("#/lib/toolbox/crc32_calc.h"),
File("#/lib/toolbox/dir_walk.h"),
File("#/lib/toolbox/md5.h"),
File("#/lib/toolbox/args.h"),
File("#/lib/toolbox/saved_struct.h"),
File("#/lib/toolbox/version.h"),
File("#/lib/toolbox/tar/tar_archive.h"),
File("#/lib/toolbox/stream/stream.h"),
File("#/lib/toolbox/stream/file_stream.h"),
File("#/lib/toolbox/stream/string_stream.h"),
File("#/lib/toolbox/stream/buffered_file_stream.h"),
File("#/lib/toolbox/protocols/protocol_dict.h"),
File("manchester_decoder.h"),
File("manchester_encoder.h"),
File("path.h"),
File("random_name.h"),
File("hmac_sha256.h"),
File("crc32_calc.h"),
File("dir_walk.h"),
File("md5.h"),
File("args.h"),
File("saved_struct.h"),
File("version.h"),
File("tar/tar_archive.h"),
File("stream/stream.h"),
File("stream/file_stream.h"),
File("stream/string_stream.h"),
File("stream/buffered_file_stream.h"),
File("protocols/protocol_dict.h"),
],
)