[FL-2627] Flipper applications: SDK, build and debug system (#1387)
* Added support for running applications from SD card (FAPs - Flipper Application Packages) * Added plugin_dist target for fbt to build FAPs * All apps of type FlipperAppType.EXTERNAL and FlipperAppType.PLUGIN are built as FAPs by default * Updated VSCode configuration for new fbt features - re-deploy stock configuration to use them * Added debugging support for FAPs with fbt debug & VSCode * Added public firmware API with automated versioning Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: SG <who.just.the.doctor@gmail.com> Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -7,6 +7,23 @@ env.Append(
|
||||
CPPPATH=[
|
||||
"#/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"),
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
|
@@ -1,3 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "sha256.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct hmac_context {
|
||||
void (*init_hash)(const struct hmac_context* context);
|
||||
@@ -25,3 +32,7 @@ void hmac_sha256_update(
|
||||
unsigned message_size);
|
||||
|
||||
void hmac_sha256_finish(const hmac_sha256_context* ctx, const uint8_t* K, uint8_t* hash_result);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -4,6 +4,14 @@
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
bool saved_struct_load(const char* path, void* data, size_t size, uint8_t magic, uint8_t version);
|
||||
|
||||
bool saved_struct_save(const char* path, void* data, size_t size, uint8_t magic, uint8_t version);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -1,3 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SHA256_DIGEST_SIZE 32
|
||||
#define SHA256_BLOCK_SIZE 64
|
||||
|
||||
@@ -12,3 +18,7 @@ void sha256_start(sha256_context* ctx);
|
||||
void sha256_finish(sha256_context* ctx, unsigned char output[32]);
|
||||
void sha256_update(sha256_context* ctx, const unsigned char* input, unsigned int ilen);
|
||||
void sha256_process(sha256_context* ctx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user