[FL-2052] New build system based on scons (#1269)
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
- `ibutton` - iButton application, onewire keys and more
|
||||
- `input` - Input service
|
||||
- `infrared` - Infrared application, controls your IR devices
|
||||
- `infrared_monitor` - Infrared debug tool
|
||||
- `lfrfid` - LF RFID application
|
||||
- `lfrfid_debug` - LF RFID debug tool
|
||||
- `loader` - Application loader service
|
||||
@@ -36,6 +35,4 @@
|
||||
- `u2f` - U2F Application
|
||||
- `updater` - Update service & application
|
||||
|
||||
- `application.c` - Firmware application list source
|
||||
- `application.h` - Firmware application list header
|
||||
- `application.mk` - Makefile helper
|
||||
|
@@ -5,6 +5,7 @@
|
||||
#include <gui/modules/empty_screen.h>
|
||||
#include <m-string.h>
|
||||
#include <furi_hal_version.h>
|
||||
#include <furi_hal_bt.h>
|
||||
|
||||
typedef DialogMessageButton (*AboutDialogScreen)(DialogsApp* dialogs, DialogMessage* message);
|
||||
|
||||
@@ -57,7 +58,7 @@ static DialogMessageButton compliance_screen(DialogsApp* dialogs, DialogMessage*
|
||||
static DialogMessageButton icon1_screen(DialogsApp* dialogs, DialogMessage* message) {
|
||||
DialogMessageButton result;
|
||||
|
||||
dialog_message_set_icon(message, &I_Certification1_103x23, 12, 12);
|
||||
dialog_message_set_icon(message, &I_Certification1_103x56, 13, 0);
|
||||
result = dialog_message_show(dialogs, message);
|
||||
dialog_message_set_icon(message, NULL, 0, 0);
|
||||
|
||||
@@ -67,7 +68,7 @@ static DialogMessageButton icon1_screen(DialogsApp* dialogs, DialogMessage* mess
|
||||
static DialogMessageButton icon2_screen(DialogsApp* dialogs, DialogMessage* message) {
|
||||
DialogMessageButton result;
|
||||
|
||||
dialog_message_set_icon(message, &I_Certification2_119x30, 4, 9);
|
||||
dialog_message_set_icon(message, &I_Certification2_98x33, 15, 10);
|
||||
result = dialog_message_show(dialogs, message);
|
||||
dialog_message_set_icon(message, NULL, 0, 0);
|
||||
|
||||
@@ -111,18 +112,23 @@ static DialogMessageButton fw_version_screen(DialogsApp* dialogs, DialogMessage*
|
||||
string_t buffer;
|
||||
string_init(buffer);
|
||||
const Version* ver = furi_hal_version_get_firmware_version();
|
||||
const BleGlueC2Info* c2_ver = NULL;
|
||||
#ifdef SRV_BT
|
||||
c2_ver = ble_glue_get_c2_info();
|
||||
#endif
|
||||
|
||||
if(!ver) {
|
||||
string_cat_printf(buffer, "No info\n");
|
||||
} else {
|
||||
string_cat_printf(
|
||||
buffer,
|
||||
"%s [%s]\n%s%s [%s]\n[%d] %s",
|
||||
"%s [%s]\n%s%s [%s] %s\n[%d] %s",
|
||||
version_get_version(ver),
|
||||
version_get_builddate(ver),
|
||||
version_get_dirty_flag(ver) ? "[!] " : "",
|
||||
version_get_githash(ver),
|
||||
version_get_gitbranchnum(ver),
|
||||
c2_ver ? c2_ver->StackTypeString : "<none>",
|
||||
version_get_target(ver),
|
||||
version_get_gitbranch(ver));
|
||||
}
|
||||
|
13
applications/about/application.fam
Normal file
13
applications/about/application.fam
Normal file
@@ -0,0 +1,13 @@
|
||||
App(
|
||||
appid="about",
|
||||
name="About",
|
||||
apptype=FlipperAppType.SETTINGS,
|
||||
entry_point="about_settings_app",
|
||||
cdefines=["APP_ABOUT"],
|
||||
requires=[
|
||||
"gui",
|
||||
"dialogs",
|
||||
],
|
||||
stack_size=1 * 1024,
|
||||
order=1000,
|
||||
)
|
10
applications/accessor/application.fam
Normal file
10
applications/accessor/application.fam
Normal file
@@ -0,0 +1,10 @@
|
||||
App(
|
||||
appid="accessor",
|
||||
name="Accessor",
|
||||
apptype=FlipperAppType.DEBUG,
|
||||
entry_point="accessor_app",
|
||||
cdefines=["APP_ACCESSOR"],
|
||||
requires=["gui"],
|
||||
stack_size=4 * 1024,
|
||||
order=40,
|
||||
)
|
@@ -1,549 +0,0 @@
|
||||
#include "applications.h"
|
||||
#include <assets_icons.h>
|
||||
|
||||
// Services
|
||||
extern int32_t rpc_srv(void* p);
|
||||
extern int32_t bt_srv(void* p);
|
||||
extern int32_t cli_srv(void* p);
|
||||
extern int32_t dialogs_srv(void* p);
|
||||
extern int32_t dolphin_srv(void* p);
|
||||
extern int32_t gui_srv(void* p);
|
||||
extern int32_t input_srv(void* p);
|
||||
extern int32_t loader_srv(void* p);
|
||||
extern int32_t notification_srv(void* p);
|
||||
extern int32_t power_srv(void* p);
|
||||
extern int32_t storage_srv(void* p);
|
||||
extern int32_t desktop_srv(void* p);
|
||||
extern int32_t updater_srv(void* p);
|
||||
|
||||
// Apps
|
||||
extern int32_t accessor_app(void* p);
|
||||
extern int32_t archive_app(void* p);
|
||||
extern int32_t bad_usb_app(void* p);
|
||||
extern int32_t u2f_app(void* p);
|
||||
extern int32_t uart_echo_app(void* p);
|
||||
extern int32_t blink_test_app(void* p);
|
||||
extern int32_t bt_debug_app(void* p);
|
||||
extern int32_t delay_test_app(void* p);
|
||||
extern int32_t display_test_app(void* p);
|
||||
extern int32_t gpio_app(void* p);
|
||||
extern int32_t ibutton_app(void* p);
|
||||
extern int32_t infrared_app(void* p);
|
||||
extern int32_t keypad_test_app(void* p);
|
||||
extern int32_t lfrfid_app(void* p);
|
||||
extern int32_t lfrfid_debug_app(void* p);
|
||||
extern int32_t nfc_app(void* p);
|
||||
extern int32_t passport_app(void* p);
|
||||
extern int32_t scened_app(void* p);
|
||||
extern int32_t storage_test_app(void* p);
|
||||
extern int32_t subghz_app(void* p);
|
||||
extern int32_t usb_mouse_app(void* p);
|
||||
extern int32_t usb_test_app(void* p);
|
||||
extern int32_t vibro_test_app(void* p);
|
||||
extern int32_t bt_hid_app(void* p);
|
||||
extern int32_t battery_test_app(void* p);
|
||||
extern int32_t text_box_test_app(void* p);
|
||||
extern int32_t file_browser_app(void* p);
|
||||
|
||||
// Plugins
|
||||
extern int32_t music_player_app(void* p);
|
||||
extern int32_t snake_game_app(void* p);
|
||||
|
||||
// On system start hooks declaration
|
||||
extern void bt_on_system_start();
|
||||
extern void crypto_on_system_start();
|
||||
extern void ibutton_on_system_start();
|
||||
extern void infrared_on_system_start();
|
||||
extern void lfrfid_on_system_start();
|
||||
extern void music_player_on_system_start();
|
||||
extern void nfc_on_system_start();
|
||||
extern void storage_on_system_start();
|
||||
extern void subghz_on_system_start();
|
||||
extern void power_on_system_start();
|
||||
extern void unit_tests_on_system_start();
|
||||
extern void updater_on_system_start();
|
||||
|
||||
// Settings
|
||||
extern int32_t notification_settings_app(void* p);
|
||||
extern int32_t storage_settings_app(void* p);
|
||||
extern int32_t bt_settings_app(void* p);
|
||||
extern int32_t desktop_settings_app(void* p);
|
||||
extern int32_t about_settings_app(void* p);
|
||||
extern int32_t power_settings_app(void* p);
|
||||
extern int32_t system_settings_app(void* p);
|
||||
|
||||
const FlipperApplication FLIPPER_SERVICES[] = {
|
||||
/* Services */
|
||||
#ifdef SRV_RPC
|
||||
{.app = rpc_srv,
|
||||
.name = "RpcSrv",
|
||||
.stack_size = 1024 * 4,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef SRV_BT
|
||||
{.app = bt_srv,
|
||||
.name = "BtSrv",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef SRV_CLI
|
||||
{.app = cli_srv,
|
||||
.name = "CliSrv",
|
||||
.stack_size = 4096,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef SRV_DIALOGS
|
||||
{.app = dialogs_srv,
|
||||
.name = "DialogsSrv",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef SRV_DOLPHIN
|
||||
{.app = dolphin_srv,
|
||||
.name = "DolphinSrv",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef SRV_DESKTOP
|
||||
#ifdef SRV_UPDATER
|
||||
#error SRV_UPDATER and SRV_DESKTOP are mutually exclusive!
|
||||
#endif
|
||||
{.app = desktop_srv,
|
||||
.name = "DesktopSrv",
|
||||
.stack_size = 2048,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef SRV_GUI
|
||||
{.app = gui_srv,
|
||||
.name = "GuiSrv",
|
||||
.stack_size = 2048,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef SRV_INPUT
|
||||
{.app = input_srv,
|
||||
.name = "InputSrv",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef SRV_LOADER
|
||||
{.app = loader_srv,
|
||||
.name = "LoaderSrv",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef SRV_NOTIFICATION
|
||||
{.app = notification_srv,
|
||||
.name = "NotificationSrv",
|
||||
.stack_size = 1536,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef SRV_POWER
|
||||
{.app = power_srv,
|
||||
.name = "PowerSrv",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef SRV_STORAGE
|
||||
{.app = storage_srv,
|
||||
.name = "StorageSrv",
|
||||
.stack_size = 3072,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef SRV_UPDATER
|
||||
#ifdef SRV_DESKTOP
|
||||
#error SRV_UPDATER and SRV_DESKTOP are mutually exclusive!
|
||||
#endif
|
||||
{.app = updater_srv,
|
||||
.name = "UpdaterSrv",
|
||||
.stack_size = 2048,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
};
|
||||
|
||||
const size_t FLIPPER_SERVICES_COUNT = COUNT_OF(FLIPPER_SERVICES);
|
||||
|
||||
const FlipperApplication FLIPPER_SYSTEM_APPS[] = {
|
||||
#ifdef APP_UPDATER
|
||||
#ifdef SRV_UPDATER
|
||||
#error APP_UPDATER and SRV_UPDATER are mutually exclusive!
|
||||
#endif
|
||||
{.app = updater_srv,
|
||||
.name = "UpdaterApp",
|
||||
.stack_size = 2048,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
};
|
||||
|
||||
const size_t FLIPPER_SYSTEM_APPS_COUNT = COUNT_OF(FLIPPER_SYSTEM_APPS);
|
||||
|
||||
// Main menu APP
|
||||
const FlipperApplication FLIPPER_APPS[] = {
|
||||
|
||||
#ifdef APP_SUBGHZ
|
||||
{.app = subghz_app,
|
||||
.name = "Sub-GHz",
|
||||
.stack_size = 2048,
|
||||
.icon = &A_Sub1ghz_14,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_LF_RFID
|
||||
{.app = lfrfid_app,
|
||||
.name = "125 kHz RFID",
|
||||
.stack_size = 2048,
|
||||
.icon = &A_125khz_14,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_NFC
|
||||
{.app = nfc_app,
|
||||
.name = "NFC",
|
||||
.stack_size = 4096,
|
||||
.icon = &A_NFC_14,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_INFRARED
|
||||
{.app = infrared_app,
|
||||
.name = "Infrared",
|
||||
.stack_size = 1024 * 3,
|
||||
.icon = &A_Infrared_14,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_GPIO
|
||||
{.app = gpio_app,
|
||||
.name = "GPIO",
|
||||
.stack_size = 1024,
|
||||
.icon = &A_GPIO_14,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_IBUTTON
|
||||
{.app = ibutton_app,
|
||||
.name = "iButton",
|
||||
.stack_size = 2048,
|
||||
.icon = &A_iButton_14,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_BAD_USB
|
||||
{.app = bad_usb_app,
|
||||
.name = "Bad USB",
|
||||
.stack_size = 2048,
|
||||
.icon = &A_BadUsb_14,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_U2F
|
||||
{.app = u2f_app,
|
||||
.name = "U2F",
|
||||
.stack_size = 2048,
|
||||
.icon = &A_U2F_14,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
const size_t FLIPPER_APPS_COUNT = COUNT_OF(FLIPPER_APPS);
|
||||
|
||||
// On system start hooks
|
||||
const FlipperOnStartHook FLIPPER_ON_SYSTEM_START[] = {
|
||||
crypto_on_system_start,
|
||||
|
||||
#ifdef APP_INFRARED
|
||||
infrared_on_system_start,
|
||||
#endif
|
||||
|
||||
#ifdef APP_MUSIC_PLAYER
|
||||
music_player_on_system_start,
|
||||
#endif
|
||||
|
||||
#ifdef APP_NFC
|
||||
nfc_on_system_start,
|
||||
#endif
|
||||
|
||||
#ifdef APP_SUBGHZ
|
||||
subghz_on_system_start,
|
||||
#endif
|
||||
|
||||
#ifdef APP_LF_RFID
|
||||
lfrfid_on_system_start,
|
||||
#endif
|
||||
|
||||
#ifdef APP_IBUTTON
|
||||
ibutton_on_system_start,
|
||||
#endif
|
||||
|
||||
#ifdef SRV_BT
|
||||
bt_on_system_start,
|
||||
#endif
|
||||
|
||||
#ifdef SRV_POWER
|
||||
power_on_system_start,
|
||||
#endif
|
||||
|
||||
#ifdef SRV_STORAGE
|
||||
storage_on_system_start,
|
||||
#endif
|
||||
|
||||
#ifdef APP_UNIT_TESTS
|
||||
unit_tests_on_system_start,
|
||||
#endif
|
||||
|
||||
#ifdef APP_UPDATER
|
||||
updater_on_system_start,
|
||||
#endif
|
||||
};
|
||||
|
||||
const size_t FLIPPER_ON_SYSTEM_START_COUNT = COUNT_OF(FLIPPER_ON_SYSTEM_START);
|
||||
|
||||
// Plugin menu
|
||||
const FlipperApplication FLIPPER_PLUGINS[] = {
|
||||
#ifdef APP_BLE_HID
|
||||
{.app = bt_hid_app,
|
||||
.name = "Bluetooth Remote",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_MUSIC_PLAYER
|
||||
{.app = music_player_app,
|
||||
.name = "Music Player",
|
||||
.stack_size = 2048,
|
||||
.icon = &A_Plugins_14,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_SNAKE_GAME
|
||||
{.app = snake_game_app,
|
||||
.name = "Snake Game",
|
||||
.stack_size = 1024,
|
||||
.icon = &A_Plugins_14,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
};
|
||||
|
||||
const size_t FLIPPER_PLUGINS_COUNT = COUNT_OF(FLIPPER_PLUGINS);
|
||||
|
||||
// Plugin menu
|
||||
const FlipperApplication FLIPPER_DEBUG_APPS[] = {
|
||||
#ifdef APP_BLINK
|
||||
{.app = blink_test_app,
|
||||
.name = "Blink Test",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_VIBRO_TEST
|
||||
{.app = vibro_test_app,
|
||||
.name = "Vibro Test",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_KEYPAD_TEST
|
||||
{.app = keypad_test_app,
|
||||
.name = "Keypad Test",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_ACCESSOR
|
||||
{.app = accessor_app,
|
||||
.name = "Accessor",
|
||||
.stack_size = 4096,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_USB_TEST
|
||||
{.app = usb_test_app,
|
||||
.name = "USB Test",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_USB_MOUSE
|
||||
{.app = usb_mouse_app,
|
||||
.name = "USB Mouse Demo",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_UART_ECHO
|
||||
{.app = uart_echo_app,
|
||||
.name = "Uart Echo",
|
||||
.stack_size = 2048,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_LF_RFID
|
||||
{.app = lfrfid_debug_app,
|
||||
.name = "LF-RFID Debug",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef SRV_BT
|
||||
{.app = bt_debug_app,
|
||||
.name = "Bluetooth Debug",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_UNIT_TESTS
|
||||
{.app = delay_test_app,
|
||||
.name = "Delay Test",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_DISPLAY_TEST
|
||||
{.app = display_test_app,
|
||||
.name = "Display Test",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_FILE_BROWSER_TEST
|
||||
{.app = file_browser_app,
|
||||
.name = "File Browser test",
|
||||
.stack_size = 2048,
|
||||
.icon = &A_BadUsb_14,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_BATTERY_TEST
|
||||
{.app = battery_test_app,
|
||||
.name = "Battery Test",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_TEXT_BOX_TEST
|
||||
{.app = text_box_test_app,
|
||||
.name = "Text Box Test",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
};
|
||||
|
||||
const size_t FLIPPER_DEBUG_APPS_COUNT = COUNT_OF(FLIPPER_DEBUG_APPS);
|
||||
|
||||
#ifdef APP_ARCHIVE
|
||||
const FlipperApplication FLIPPER_ARCHIVE = {
|
||||
.app = archive_app,
|
||||
.name = "Archive",
|
||||
.stack_size = 4096,
|
||||
.icon = &A_FileManager_14,
|
||||
.flags = FlipperApplicationFlagDefault};
|
||||
#endif
|
||||
|
||||
// Settings menu
|
||||
const FlipperApplication FLIPPER_SETTINGS_APPS[] = {
|
||||
#ifdef SRV_BT
|
||||
{.app = bt_settings_app,
|
||||
.name = "Bluetooth",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef SRV_NOTIFICATION
|
||||
{.app = notification_settings_app,
|
||||
.name = "LCD and Notifications",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef SRV_STORAGE
|
||||
{.app = storage_settings_app,
|
||||
.name = "Storage",
|
||||
.stack_size = 2048,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef SRV_POWER
|
||||
{.app = power_settings_app,
|
||||
.name = "Power",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagInsomniaSafe},
|
||||
#endif
|
||||
|
||||
#ifdef SRV_DESKTOP
|
||||
{.app = desktop_settings_app,
|
||||
.name = "Desktop",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_PASSPORT
|
||||
{.app = passport_app,
|
||||
.name = "Passport",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef SRV_GUI
|
||||
{.app = system_settings_app,
|
||||
.name = "System",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
|
||||
#ifdef APP_ABOUT
|
||||
{.app = about_settings_app,
|
||||
.name = "About",
|
||||
.stack_size = 1024,
|
||||
.icon = NULL,
|
||||
.flags = FlipperApplicationFlagDefault},
|
||||
#endif
|
||||
};
|
||||
|
||||
const size_t FLIPPER_SETTINGS_APPS_COUNT = COUNT_OF(FLIPPER_SETTINGS_APPS);
|
@@ -1,353 +0,0 @@
|
||||
APP_DIR = $(PROJECT_ROOT)/applications
|
||||
LIB_DIR = $(PROJECT_ROOT)/lib
|
||||
|
||||
CFLAGS += -I$(APP_DIR)
|
||||
C_SOURCES += $(shell find $(APP_DIR) -name "*.c")
|
||||
CPP_SOURCES += $(shell find $(APP_DIR) -name "*.cpp")
|
||||
|
||||
RAM_EXEC ?= 0
|
||||
ifeq ($(RAM_EXEC), 1)
|
||||
APP_RELEASE = 0
|
||||
SRV_GUI = 1
|
||||
SRV_INPUT = 1
|
||||
SRV_NOTIFICATION = 1
|
||||
SRV_STORAGE = 1
|
||||
SRV_UPDATER = 1
|
||||
APP_UPDATER = 0
|
||||
endif
|
||||
|
||||
APP_RELEASE ?= 1
|
||||
ifeq ($(APP_RELEASE), 1)
|
||||
# Services
|
||||
SRV_BT = 1
|
||||
SRV_CLI = 1
|
||||
SRV_DIALOGS = 1
|
||||
SRV_DOLPHIN = 1
|
||||
SRV_GUI = 1
|
||||
SRV_INPUT = 1
|
||||
SRV_LOADER = 1
|
||||
SRV_NOTIFICATION = 1
|
||||
SRV_POWER = 1
|
||||
SRV_RPC = 1
|
||||
SRV_STORAGE = 1
|
||||
|
||||
# Apps
|
||||
SRV_DESKTOP = 1
|
||||
APP_ARCHIVE = 1
|
||||
APP_GPIO = 1
|
||||
APP_IBUTTON = 1
|
||||
APP_INFRARED = 1
|
||||
APP_LF_RFID = 1
|
||||
APP_NFC = 1
|
||||
APP_SUBGHZ = 1
|
||||
APP_ABOUT = 1
|
||||
APP_PASSPORT = 1
|
||||
APP_UPDATER = 1
|
||||
|
||||
# Plugins
|
||||
APP_MUSIC_PLAYER = 1
|
||||
APP_SNAKE_GAME = 1
|
||||
|
||||
# Debug
|
||||
APP_ACCESSOR = 1
|
||||
APP_BLINK = 1
|
||||
APP_KEYPAD_TEST = 1
|
||||
APP_SD_TEST = 1
|
||||
APP_VIBRO_TEST = 1
|
||||
APP_USB_TEST = 1
|
||||
APP_DISPLAY_TEST = 1
|
||||
APP_BLE_HID = 1
|
||||
APP_USB_MOUSE = 1
|
||||
APP_BAD_USB = 1
|
||||
APP_U2F = 1
|
||||
APP_UART_ECHO = 1
|
||||
APP_FILE_BROWSER_TEST = 1
|
||||
endif
|
||||
|
||||
|
||||
# Applications
|
||||
# that will be shown in menu
|
||||
# Prefix with APP_*
|
||||
|
||||
APP_UNIT_TESTS ?= 0
|
||||
ifeq ($(APP_UNIT_TESTS), 1)
|
||||
CFLAGS += -DAPP_UNIT_TESTS
|
||||
endif
|
||||
|
||||
|
||||
APP_ARCHIVE ?= 0
|
||||
ifeq ($(APP_ARCHIVE), 1)
|
||||
CFLAGS += -DAPP_ARCHIVE
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
|
||||
APP_BLINK ?= 0
|
||||
ifeq ($(APP_BLINK), 1)
|
||||
CFLAGS += -DAPP_BLINK
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
|
||||
APP_SUBGHZ ?= 0
|
||||
ifeq ($(APP_SUBGHZ), 1)
|
||||
CFLAGS += -DAPP_SUBGHZ
|
||||
SRV_GUI = 1
|
||||
SRV_CLI = 1
|
||||
endif
|
||||
|
||||
|
||||
APP_ABOUT ?= 0
|
||||
ifeq ($(APP_ABOUT), 1)
|
||||
CFLAGS += -DAPP_ABOUT
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
|
||||
APP_PASSPORT ?= 0
|
||||
ifeq ($(APP_PASSPORT), 1)
|
||||
CFLAGS += -DAPP_PASSPORT
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
|
||||
APP_LF_RFID ?= 0
|
||||
ifeq ($(APP_LF_RFID), 1)
|
||||
CFLAGS += -DAPP_LF_RFID
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
|
||||
APP_NFC ?= 0
|
||||
ifeq ($(APP_NFC), 1)
|
||||
CFLAGS += -DAPP_NFC
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
|
||||
APP_INFRARED ?= 0
|
||||
ifeq ($(APP_INFRARED), 1)
|
||||
CFLAGS += -DAPP_INFRARED
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
|
||||
APP_VIBRO_TEST ?= 0
|
||||
ifeq ($(APP_VIBRO_TEST), 1)
|
||||
CFLAGS += -DAPP_VIBRO_TEST
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
|
||||
APP_USB_TEST ?= 0
|
||||
ifeq ($(APP_USB_TEST), 1)
|
||||
CFLAGS += -DAPP_USB_TEST
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
APP_UART_ECHO ?= 0
|
||||
ifeq ($(APP_UART_ECHO), 1)
|
||||
CFLAGS += -DAPP_UART_ECHO
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
APP_DISPLAY_TEST ?= 0
|
||||
ifeq ($(APP_DISPLAY_TEST), 1)
|
||||
CFLAGS += -DAPP_DISPLAY_TEST
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
APP_TEXT_BOX_TEST ?= 0
|
||||
ifeq ($(APP_TEXT_BOX_TEST), 1)
|
||||
CFLAGS += -DAPP_TEXT_BOX_TEST
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
APP_BATTERY_TEST ?= 0
|
||||
ifeq ($(APP_BATTERY_TEST), 1)
|
||||
CFLAGS += -DAPP_BATTERY_TEST
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
APP_USB_MOUSE ?= 0
|
||||
ifeq ($(APP_USB_MOUSE), 1)
|
||||
CFLAGS += -DAPP_USB_MOUSE
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
APP_BAD_USB ?= 0
|
||||
ifeq ($(APP_BAD_USB), 1)
|
||||
CFLAGS += -DAPP_BAD_USB
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
APP_U2F ?= 0
|
||||
ifeq ($(APP_U2F), 1)
|
||||
CFLAGS += -DAPP_U2F
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
APP_BLE_HID ?=0
|
||||
ifeq ($(APP_BLE_HID), 1)
|
||||
CFLAGS += -DAPP_BLE_HID
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
APP_KEYPAD_TEST ?= 0
|
||||
ifeq ($(APP_KEYPAD_TEST), 1)
|
||||
CFLAGS += -DAPP_KEYPAD_TEST
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
APP_FILE_BROWSER_TEST ?= 0
|
||||
ifeq ($(APP_FILE_BROWSER_TEST), 1)
|
||||
CFLAGS += -DAPP_FILE_BROWSER_TEST
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
APP_ACCESSOR ?= 0
|
||||
ifeq ($(APP_ACCESSOR), 1)
|
||||
CFLAGS += -DAPP_ACCESSOR
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
|
||||
APP_GPIO ?= 0
|
||||
ifeq ($(APP_GPIO), 1)
|
||||
CFLAGS += -DAPP_GPIO
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
|
||||
APP_MUSIC_PLAYER ?= 0
|
||||
ifeq ($(APP_MUSIC_PLAYER), 1)
|
||||
CFLAGS += -DAPP_MUSIC_PLAYER
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
APP_SNAKE_GAME ?= 0
|
||||
ifeq ($(APP_SNAKE_GAME), 1)
|
||||
CFLAGS += -DAPP_SNAKE_GAME
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
APP_IBUTTON ?= 0
|
||||
ifeq ($(APP_IBUTTON), 1)
|
||||
CFLAGS += -DAPP_IBUTTON
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
APP_UPDATER ?= 0
|
||||
ifeq ($(APP_UPDATER), 1)
|
||||
CFLAGS += -DAPP_UPDATER
|
||||
SRV_GUI = 1
|
||||
SRV_STORAGE = 1
|
||||
SRV_NOTIFICATION = 1
|
||||
SRV_INPUT = 1
|
||||
endif
|
||||
|
||||
# Services
|
||||
# that will start with OS
|
||||
# Prefix with SRV_*
|
||||
|
||||
|
||||
SRV_BT ?= 0
|
||||
ifeq ($(SRV_BT), 1)
|
||||
CFLAGS += -DSRV_BT
|
||||
SRV_CLI = 1
|
||||
endif
|
||||
|
||||
|
||||
SRV_DESKTOP ?= 0
|
||||
ifeq ($(SRV_DESKTOP), 1)
|
||||
CFLAGS += -DSRV_DESKTOP
|
||||
SRV_DOLPHIN = 1
|
||||
SRV_STORAGE = 1
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
|
||||
SRV_UPDATER ?= 0
|
||||
ifeq ($(SRV_UPDATER), 1)
|
||||
CFLAGS += -DSRV_UPDATER
|
||||
SRV_STORAGE = 1
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
|
||||
SRV_DOLPHIN ?= 0
|
||||
ifeq ($(SRV_DOLPHIN), 1)
|
||||
CFLAGS += -DSRV_DOLPHIN
|
||||
SRV_DOLPHIN_STATE_DEBUG ?= 0
|
||||
ifeq ($(SRV_DOLPHIN_STATE_DEBUG), 1)
|
||||
CFLAGS += -DSRV_DOLPHIN_STATE_DEBUG
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
SRV_POWER ?= 0
|
||||
ifeq ($(SRV_POWER), 1)
|
||||
CFLAGS += -DSRV_POWER
|
||||
SRV_GUI = 1
|
||||
SRV_CLI = 1
|
||||
endif
|
||||
|
||||
SRV_RPC ?= 0
|
||||
ifeq ($(SRV_RPC), 1)
|
||||
CFLAGS += -DSRV_RPC
|
||||
ifeq ($(SRV_RPC_DEBUG), 1)
|
||||
CFLAGS += -DSRV_RPC_DEBUG
|
||||
endif
|
||||
SRV_CLI = 1
|
||||
endif
|
||||
|
||||
SRV_LOADER ?= 0
|
||||
ifeq ($(SRV_LOADER), 1)
|
||||
CFLAGS += -DSRV_LOADER
|
||||
SRV_GUI = 1
|
||||
# Loader autostart hook
|
||||
LOADER_AUTOSTART ?= ""
|
||||
ifneq ($(strip $(LOADER_AUTOSTART)), "")
|
||||
CFLAGS += -DLOADER_AUTOSTART="\"$(LOADER_AUTOSTART)\""
|
||||
endif
|
||||
# Loader autostart hook END
|
||||
endif
|
||||
|
||||
|
||||
SRV_DIALOGS ?= 0
|
||||
ifeq ($(SRV_DIALOGS), 1)
|
||||
CFLAGS += -DSRV_DIALOGS
|
||||
SRV_GUI = 1
|
||||
endif
|
||||
|
||||
|
||||
SRV_GUI ?= 0
|
||||
ifeq ($(SRV_GUI), 1)
|
||||
CFLAGS += -DSRV_GUI
|
||||
SRV_INPUT = 1
|
||||
SRV_NOTIFICATION = 1
|
||||
endif
|
||||
|
||||
|
||||
SRV_INPUT ?= 0
|
||||
ifeq ($(SRV_INPUT), 1)
|
||||
CFLAGS += -DSRV_INPUT
|
||||
endif
|
||||
|
||||
|
||||
SRV_CLI ?= 0
|
||||
ifeq ($(SRV_CLI), 1)
|
||||
CFLAGS += -DSRV_CLI
|
||||
endif
|
||||
|
||||
|
||||
SRV_NOTIFICATION ?= 0
|
||||
ifeq ($(SRV_NOTIFICATION), 1)
|
||||
CFLAGS += -DSRV_NOTIFICATION
|
||||
endif
|
||||
|
||||
|
||||
SRV_STORAGE ?= 0
|
||||
ifeq ($(SRV_STORAGE), 1)
|
||||
CFLAGS += -DSRV_STORAGE
|
||||
endif
|
11
applications/archive/application.fam
Normal file
11
applications/archive/application.fam
Normal file
@@ -0,0 +1,11 @@
|
||||
App(
|
||||
appid="archive",
|
||||
name="Archive",
|
||||
apptype=FlipperAppType.ARCHIVE,
|
||||
entry_point="archive_app",
|
||||
cdefines=["APP_ARCHIVE"],
|
||||
requires=["gui"],
|
||||
stack_size=4 * 1024,
|
||||
icon="A_FileManager_14",
|
||||
order=0,
|
||||
)
|
14
applications/bad_usb/application.fam
Normal file
14
applications/bad_usb/application.fam
Normal file
@@ -0,0 +1,14 @@
|
||||
App(
|
||||
appid="bad_usb",
|
||||
name="Bad USB",
|
||||
apptype=FlipperAppType.APP,
|
||||
entry_point="bad_usb_app",
|
||||
cdefines=["APP_BAD_USB"],
|
||||
requires=[
|
||||
"gui",
|
||||
"dialogs",
|
||||
],
|
||||
stack_size=2 * 1024,
|
||||
icon="A_BadUsb_14",
|
||||
order=70,
|
||||
)
|
66
applications/bt/application.fam
Normal file
66
applications/bt/application.fam
Normal file
@@ -0,0 +1,66 @@
|
||||
App(
|
||||
appid="bt",
|
||||
name="BtSrv",
|
||||
apptype=FlipperAppType.SERVICE,
|
||||
entry_point="bt_srv",
|
||||
cdefines=["SRV_BT"],
|
||||
requires=[
|
||||
"cli",
|
||||
"dialogs",
|
||||
],
|
||||
provides=[
|
||||
"bt_start",
|
||||
"bt_settings",
|
||||
"bt_debug",
|
||||
],
|
||||
stack_size=1 * 1024,
|
||||
order=20,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="bt_start",
|
||||
apptype=FlipperAppType.STARTUP,
|
||||
entry_point="bt_on_system_start",
|
||||
order=70,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="bt_settings",
|
||||
name="Bluetooth",
|
||||
apptype=FlipperAppType.SETTINGS,
|
||||
entry_point="bt_settings_app",
|
||||
stack_size=1 * 1024,
|
||||
requires=[
|
||||
"bt",
|
||||
"gui",
|
||||
],
|
||||
order=10,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="bt_debug",
|
||||
name="Bluetooth Debug",
|
||||
apptype=FlipperAppType.DEBUG,
|
||||
entry_point="bt_debug_app",
|
||||
stack_size=1 * 1024,
|
||||
requires=[
|
||||
"bt",
|
||||
"gui",
|
||||
"dialogs",
|
||||
],
|
||||
order=110,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="bt_hid",
|
||||
name="Bluetooth Remote",
|
||||
apptype=FlipperAppType.PLUGIN,
|
||||
entry_point="bt_hid_app",
|
||||
stack_size=1 * 1024,
|
||||
cdefines=["APP_BLE_HID"],
|
||||
requires=[
|
||||
"bt",
|
||||
"gui",
|
||||
],
|
||||
order=10,
|
||||
)
|
9
applications/cli/application.fam
Normal file
9
applications/cli/application.fam
Normal file
@@ -0,0 +1,9 @@
|
||||
App(
|
||||
appid="cli",
|
||||
name="CliSrv",
|
||||
apptype=FlipperAppType.SERVICE,
|
||||
entry_point="cli_srv",
|
||||
cdefines=["SRV_CLI"],
|
||||
stack_size=4 * 1024,
|
||||
order=30,
|
||||
)
|
6
applications/crypto/application.fam
Normal file
6
applications/crypto/application.fam
Normal file
@@ -0,0 +1,6 @@
|
||||
App(
|
||||
appid="crypto_start",
|
||||
apptype=FlipperAppType.STARTUP,
|
||||
entry_point="crypto_on_system_start",
|
||||
order=10,
|
||||
)
|
115
applications/debug_tools/application.fam
Normal file
115
applications/debug_tools/application.fam
Normal file
@@ -0,0 +1,115 @@
|
||||
App(
|
||||
appid="debug_apps",
|
||||
name="Basic debug apps bundle",
|
||||
apptype=FlipperAppType.METAPACKAGE,
|
||||
provides=[
|
||||
"blink_test",
|
||||
"vibro_test",
|
||||
"keypad_test",
|
||||
"usb_test",
|
||||
"usb_mouse",
|
||||
"uart_echo",
|
||||
"display_test",
|
||||
"text_box_test",
|
||||
"file_browser_test",
|
||||
],
|
||||
)
|
||||
|
||||
App(
|
||||
appid="blink_test",
|
||||
name="Blink Test",
|
||||
apptype=FlipperAppType.DEBUG,
|
||||
entry_point="blink_test_app",
|
||||
cdefines=["APP_BLINK"],
|
||||
requires=["gui"],
|
||||
stack_size=1 * 1024,
|
||||
order=10,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="vibro_test",
|
||||
name="Vibro Test",
|
||||
apptype=FlipperAppType.DEBUG,
|
||||
entry_point="vibro_test_app",
|
||||
cdefines=["APP_VIBRO_TEST"],
|
||||
requires=["gui"],
|
||||
stack_size=1 * 1024,
|
||||
order=20,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="keypad_test",
|
||||
name="Keypad Test",
|
||||
apptype=FlipperAppType.DEBUG,
|
||||
entry_point="keypad_test_app",
|
||||
cdefines=["APP_KEYPAD_TEST"],
|
||||
requires=["gui"],
|
||||
stack_size=1 * 1024,
|
||||
order=30,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="usb_test",
|
||||
name="USB Test",
|
||||
apptype=FlipperAppType.DEBUG,
|
||||
entry_point="usb_test_app",
|
||||
cdefines=["APP_USB_TEST"],
|
||||
requires=["gui"],
|
||||
stack_size=1 * 1024,
|
||||
order=50,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="usb_mouse",
|
||||
name="USB Mouse Demo",
|
||||
apptype=FlipperAppType.DEBUG,
|
||||
entry_point="usb_mouse_app",
|
||||
cdefines=["APP_USB_MOUSE"],
|
||||
requires=["gui"],
|
||||
stack_size=1 * 1024,
|
||||
order=60,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="uart_echo",
|
||||
name="UART Echo",
|
||||
apptype=FlipperAppType.DEBUG,
|
||||
entry_point="uart_echo_app",
|
||||
cdefines=["APP_UART_ECHO"],
|
||||
requires=["gui"],
|
||||
stack_size=2 * 1024,
|
||||
order=70,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="display_test",
|
||||
name="Display Test",
|
||||
apptype=FlipperAppType.DEBUG,
|
||||
entry_point="display_test_app",
|
||||
cdefines=["APP_DISPLAY_TEST"],
|
||||
requires=["gui"],
|
||||
stack_size=1 * 1024,
|
||||
order=120,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="text_box_test",
|
||||
name="Text Box Test",
|
||||
apptype=FlipperAppType.DEBUG,
|
||||
entry_point="text_box_test_app",
|
||||
cdefines=["APP_TEXT_BOX_TEST"],
|
||||
requires=["gui"],
|
||||
stack_size=1 * 1024,
|
||||
order=140,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="file_browser_test",
|
||||
name="File Browser Test",
|
||||
apptype=FlipperAppType.DEBUG,
|
||||
entry_point="file_browser_app",
|
||||
cdefines=["APP_FILE_BROWSER_TEST"],
|
||||
requires=["gui"],
|
||||
stack_size=2 * 1024,
|
||||
order=150,
|
||||
)
|
30
applications/desktop/application.fam
Normal file
30
applications/desktop/application.fam
Normal file
@@ -0,0 +1,30 @@
|
||||
App(
|
||||
appid="desktop",
|
||||
name="DesktopSrv",
|
||||
apptype=FlipperAppType.SERVICE,
|
||||
entry_point="desktop_srv",
|
||||
cdefines=["SRV_DESKTOP"],
|
||||
requires=[
|
||||
"gui",
|
||||
"dolphin",
|
||||
"storage",
|
||||
"input",
|
||||
],
|
||||
provides=["desktop_settings"],
|
||||
conflicts=["updater"],
|
||||
stack_size=2 * 1024,
|
||||
order=60,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="desktop_settings",
|
||||
name="Desktop",
|
||||
apptype=FlipperAppType.SETTINGS,
|
||||
entry_point="desktop_settings_app",
|
||||
requires=[
|
||||
"desktop",
|
||||
"gui",
|
||||
],
|
||||
stack_size=1 * 1024,
|
||||
order=50,
|
||||
)
|
@@ -46,7 +46,10 @@ void desktop_debug_render(Canvas* canvas, void* model) {
|
||||
canvas_draw_str(canvas, 5, 19 + STATUS_BAR_Y_SHIFT, buffer);
|
||||
|
||||
ver = furi_hal_version_get_firmware_version();
|
||||
|
||||
const BleGlueC2Info* c2_ver = NULL;
|
||||
#ifdef SRV_BT
|
||||
c2_ver = ble_glue_get_c2_info();
|
||||
#endif
|
||||
if(!ver) {
|
||||
canvas_draw_str(canvas, 5, 29 + STATUS_BAR_Y_SHIFT, "No info");
|
||||
return;
|
||||
@@ -63,10 +66,11 @@ void desktop_debug_render(Canvas* canvas, void* model) {
|
||||
snprintf(
|
||||
buffer,
|
||||
sizeof(buffer),
|
||||
"%s%s [%s]",
|
||||
"%s%s [%s] %s",
|
||||
version_get_dirty_flag(ver) ? "[!] " : "",
|
||||
version_get_githash(ver),
|
||||
version_get_gitbranchnum(ver));
|
||||
version_get_gitbranchnum(ver),
|
||||
c2_ver ? c2_ver->StackTypeString : "<none>");
|
||||
canvas_draw_str(canvas, 5, 39 + STATUS_BAR_Y_SHIFT, buffer);
|
||||
|
||||
snprintf(
|
||||
|
10
applications/dialogs/application.fam
Normal file
10
applications/dialogs/application.fam
Normal file
@@ -0,0 +1,10 @@
|
||||
App(
|
||||
appid="dialogs",
|
||||
name="DialogsSrv",
|
||||
apptype=FlipperAppType.SERVICE,
|
||||
entry_point="dialogs_srv",
|
||||
cdefines=["SRV_DIALOGS"],
|
||||
requires=["gui"],
|
||||
stack_size=1 * 1024,
|
||||
order=40,
|
||||
)
|
23
applications/dolphin/application.fam
Normal file
23
applications/dolphin/application.fam
Normal file
@@ -0,0 +1,23 @@
|
||||
App(
|
||||
appid="dolphin",
|
||||
name="DolphinSrv",
|
||||
apptype=FlipperAppType.SERVICE,
|
||||
entry_point="dolphin_srv",
|
||||
cdefines=["SRV_DOLPHIN"],
|
||||
stack_size=1 * 1024,
|
||||
order=50,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="passport",
|
||||
name="Passport",
|
||||
apptype=FlipperAppType.SETTINGS,
|
||||
entry_point="passport_app",
|
||||
cdefines=["APP_PASSPORT"],
|
||||
requires=[
|
||||
"gui",
|
||||
"dolphin",
|
||||
],
|
||||
stack_size=1 * 1024,
|
||||
order=60,
|
||||
)
|
57
applications/extapps.scons
Normal file
57
applications/extapps.scons
Normal file
@@ -0,0 +1,57 @@
|
||||
Import("ENV")
|
||||
|
||||
|
||||
from fbt.appmanifest import FlipperAppType
|
||||
|
||||
|
||||
appenv = ENV.Clone(tools=["fbt_extapps"])
|
||||
|
||||
appenv.Replace(
|
||||
LINKER_SCRIPT="application-ext",
|
||||
STRIPFLAGS=[
|
||||
"--strip-debug",
|
||||
"--strip-unneeded",
|
||||
"-d",
|
||||
"-g",
|
||||
"-S",
|
||||
],
|
||||
)
|
||||
|
||||
appenv.AppendUnique(
|
||||
CCFLAGS=[
|
||||
"-Os",
|
||||
"-ggdb3",
|
||||
"-mword-relocations",
|
||||
"-mlong-calls",
|
||||
"-fno-common",
|
||||
"-nostdlib",
|
||||
"-fvisibility=hidden",
|
||||
],
|
||||
LINKFLAGS=[
|
||||
"-r",
|
||||
"-s",
|
||||
# "-Bsymbolic",
|
||||
"-nostartfiles",
|
||||
"-mlong-calls",
|
||||
"-fno-common",
|
||||
"-nostdlib",
|
||||
"-Wl,--gc-sections",
|
||||
"-Wl,--no-export-dynamic",
|
||||
"-fvisibility=hidden",
|
||||
"-Wl,-e${APP_ENTRY}",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
extapps = []
|
||||
for apptype in (FlipperAppType.PLUGIN, FlipperAppType.EXTERNAL):
|
||||
for app in appenv["APPBUILD"].get_apps_of_type(apptype):
|
||||
extapps.append(appenv.BuildAppElf(app))
|
||||
|
||||
# Ugly access to global option
|
||||
if extra_app_list := GetOption("extra_ext_apps"):
|
||||
for extra_app in extra_app_list.split(","):
|
||||
extapps.append(appenv.BuildAppElf(appenv["APPMGR"].get(extra_app)))
|
||||
|
||||
Alias(appenv["FIRMWARE_BUILD_CFG"] + "_extapps", extapps)
|
||||
Return("extapps")
|
11
applications/gpio/application.fam
Normal file
11
applications/gpio/application.fam
Normal file
@@ -0,0 +1,11 @@
|
||||
App(
|
||||
appid="gpio",
|
||||
name="GPIO",
|
||||
apptype=FlipperAppType.APP,
|
||||
entry_point="gpio_app",
|
||||
cdefines=["APP_GPIO"],
|
||||
requires=["gui"],
|
||||
stack_size=1 * 1024,
|
||||
icon="A_GPIO_14",
|
||||
order=50,
|
||||
)
|
13
applications/gui/application.fam
Normal file
13
applications/gui/application.fam
Normal file
@@ -0,0 +1,13 @@
|
||||
App(
|
||||
appid="gui",
|
||||
name="GuiSrv",
|
||||
apptype=FlipperAppType.SERVICE,
|
||||
entry_point="gui_srv",
|
||||
cdefines=["SRV_GUI"],
|
||||
requires=[
|
||||
"input",
|
||||
"notification",
|
||||
],
|
||||
stack_size=2 * 1024,
|
||||
order=70,
|
||||
)
|
23
applications/ibutton/application.fam
Normal file
23
applications/ibutton/application.fam
Normal file
@@ -0,0 +1,23 @@
|
||||
App(
|
||||
appid="ibutton",
|
||||
name="iButton",
|
||||
apptype=FlipperAppType.APP,
|
||||
entry_point="ibutton_app",
|
||||
cdefines=["APP_IBUTTON"],
|
||||
requires=[
|
||||
"gui",
|
||||
"dialogs",
|
||||
],
|
||||
provides=["ibutton_start"],
|
||||
icon="A_iButton_14",
|
||||
stack_size=2 * 1024,
|
||||
order=60,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="ibutton_start",
|
||||
apptype=FlipperAppType.STARTUP,
|
||||
entry_point="ibutton_on_system_start",
|
||||
requires=["ibutton"],
|
||||
order=60,
|
||||
)
|
23
applications/infrared/application.fam
Normal file
23
applications/infrared/application.fam
Normal file
@@ -0,0 +1,23 @@
|
||||
App(
|
||||
appid="infrared",
|
||||
name="Infrared",
|
||||
apptype=FlipperAppType.APP,
|
||||
entry_point="infrared_app",
|
||||
cdefines=["APP_INFRARED"],
|
||||
requires=[
|
||||
"gui",
|
||||
"dialogs",
|
||||
],
|
||||
provides=["infrared_start"],
|
||||
icon="A_Infrared_14",
|
||||
stack_size=3 * 1024,
|
||||
order=40,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="infrared_start",
|
||||
apptype=FlipperAppType.STARTUP,
|
||||
entry_point="infrared_on_system_start",
|
||||
requires=["infrared"],
|
||||
order=20,
|
||||
)
|
9
applications/input/application.fam
Normal file
9
applications/input/application.fam
Normal file
@@ -0,0 +1,9 @@
|
||||
App(
|
||||
appid="input",
|
||||
name="InputSrv",
|
||||
apptype=FlipperAppType.SERVICE,
|
||||
entry_point="input_srv",
|
||||
cdefines=["SRV_INPUT"],
|
||||
stack_size=1 * 1024,
|
||||
order=80,
|
||||
)
|
26
applications/lfrfid/application.fam
Normal file
26
applications/lfrfid/application.fam
Normal file
@@ -0,0 +1,26 @@
|
||||
App(
|
||||
appid="lfrfid",
|
||||
name="125 kHz RFID",
|
||||
apptype=FlipperAppType.APP,
|
||||
entry_point="lfrfid_app",
|
||||
cdefines=["APP_LF_RFID"],
|
||||
requires=[
|
||||
"gui",
|
||||
"dialogs",
|
||||
],
|
||||
provides=[
|
||||
"lfrfid_start",
|
||||
"lfrfid_debug",
|
||||
],
|
||||
icon="A_125khz_14",
|
||||
stack_size=2 * 1024,
|
||||
order=20,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="lfrfid_start",
|
||||
apptype=FlipperAppType.STARTUP,
|
||||
entry_point="lfrfid_on_system_start",
|
||||
requires=["lfrfid"],
|
||||
order=50,
|
||||
)
|
12
applications/lfrfid_debug/application.fam
Normal file
12
applications/lfrfid_debug/application.fam
Normal file
@@ -0,0 +1,12 @@
|
||||
App(
|
||||
appid="lfrfid_debug",
|
||||
name="LF-RFID Debug",
|
||||
apptype=FlipperAppType.DEBUG,
|
||||
entry_point="lfrfid_debug_app",
|
||||
requires=[
|
||||
"gui",
|
||||
"lfrfid",
|
||||
],
|
||||
stack_size=1 * 1024,
|
||||
order=100,
|
||||
)
|
10
applications/loader/application.fam
Normal file
10
applications/loader/application.fam
Normal file
@@ -0,0 +1,10 @@
|
||||
App(
|
||||
appid="loader",
|
||||
name="LoaderSrv",
|
||||
apptype=FlipperAppType.SERVICE,
|
||||
entry_point="loader_srv",
|
||||
cdefines=["SRV_LOADER"],
|
||||
requires=["gui"],
|
||||
stack_size=1 * 1024,
|
||||
order=90,
|
||||
)
|
41
applications/meta/application.fam
Normal file
41
applications/meta/application.fam
Normal file
@@ -0,0 +1,41 @@
|
||||
App(
|
||||
appid="basic_services",
|
||||
name="Basic services",
|
||||
apptype=FlipperAppType.METAPACKAGE,
|
||||
provides=[
|
||||
"rpc",
|
||||
"bt",
|
||||
"desktop",
|
||||
"loader",
|
||||
"power",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
App(
|
||||
appid="basic_apps",
|
||||
name="Basic applications for main menu",
|
||||
apptype=FlipperAppType.METAPACKAGE,
|
||||
provides=[
|
||||
"gpio",
|
||||
"ibutton",
|
||||
"infrared",
|
||||
"lfrfid",
|
||||
"nfc",
|
||||
"subghz",
|
||||
"bad_usb",
|
||||
"u2f",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
App(
|
||||
appid="basic_plugins",
|
||||
name="Basic applications for plug-in menu",
|
||||
apptype=FlipperAppType.METAPACKAGE,
|
||||
provides=[
|
||||
"music_player",
|
||||
"snake_game",
|
||||
"bt_hid",
|
||||
],
|
||||
)
|
22
applications/music_player/application.fam
Normal file
22
applications/music_player/application.fam
Normal file
@@ -0,0 +1,22 @@
|
||||
App(
|
||||
appid="music_player",
|
||||
name="Music Player",
|
||||
apptype=FlipperAppType.PLUGIN,
|
||||
entry_point="music_player_app",
|
||||
cdefines=["APP_MUSIC_PLAYER"],
|
||||
requires=[
|
||||
"gui",
|
||||
"dialogs",
|
||||
],
|
||||
provides=["music_player_start"],
|
||||
stack_size=2 * 1024,
|
||||
order=20,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="music_player_start",
|
||||
apptype=FlipperAppType.STARTUP,
|
||||
entry_point="music_player_on_system_start",
|
||||
requires=["music_player"],
|
||||
order=30,
|
||||
)
|
23
applications/nfc/application.fam
Normal file
23
applications/nfc/application.fam
Normal file
@@ -0,0 +1,23 @@
|
||||
App(
|
||||
appid="nfc",
|
||||
name="NFC",
|
||||
apptype=FlipperAppType.APP,
|
||||
entry_point="nfc_app",
|
||||
cdefines=["APP_NFC"],
|
||||
requires=[
|
||||
"gui",
|
||||
"dialogs",
|
||||
],
|
||||
provides=["nfc_start"],
|
||||
icon="A_NFC_14",
|
||||
stack_size=4 * 1024,
|
||||
order=30,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="nfc_start",
|
||||
apptype=FlipperAppType.STARTUP,
|
||||
entry_point="nfc_on_system_start",
|
||||
requires=["nfc"],
|
||||
order=30,
|
||||
)
|
21
applications/notification/application.fam
Normal file
21
applications/notification/application.fam
Normal file
@@ -0,0 +1,21 @@
|
||||
App(
|
||||
appid="notification",
|
||||
name="NotificationSrv",
|
||||
apptype=FlipperAppType.SERVICE,
|
||||
entry_point="notification_srv",
|
||||
cdefines=["SRV_NOTIFICATION"],
|
||||
requires=["input"],
|
||||
provides=["notification_settings"],
|
||||
stack_size=int(1.5 * 1024),
|
||||
order=100,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="notification_settings",
|
||||
name="LCD and Notifications",
|
||||
apptype=FlipperAppType.SETTINGS,
|
||||
entry_point="notification_settings_app",
|
||||
requires=["notification"],
|
||||
stack_size=1 * 1024,
|
||||
order=20,
|
||||
)
|
53
applications/power/application.fam
Normal file
53
applications/power/application.fam
Normal file
@@ -0,0 +1,53 @@
|
||||
App(
|
||||
appid="power",
|
||||
name="PowerSrv",
|
||||
apptype=FlipperAppType.SERVICE,
|
||||
entry_point="power_srv",
|
||||
cdefines=["SRV_POWER"],
|
||||
requires=[
|
||||
"gui",
|
||||
"cli",
|
||||
],
|
||||
provides=[
|
||||
"power_settings",
|
||||
"power_start",
|
||||
],
|
||||
stack_size=1 * 1024,
|
||||
order=110,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="power_settings",
|
||||
name="Power",
|
||||
apptype=FlipperAppType.SETTINGS,
|
||||
entry_point="power_settings_app",
|
||||
requires=[
|
||||
"gui",
|
||||
"power",
|
||||
],
|
||||
flags=["InsomniaSafe"],
|
||||
stack_size=1 * 1024,
|
||||
order=40,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="power_start",
|
||||
apptype=FlipperAppType.STARTUP,
|
||||
entry_point="power_on_system_start",
|
||||
requires=["power"],
|
||||
order=80,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="battery_test",
|
||||
name="Battery Test",
|
||||
apptype=FlipperAppType.DEBUG,
|
||||
entry_point="battery_test_app",
|
||||
cdefines=["APP_BATTERY_TEST"],
|
||||
requires=[
|
||||
"gui",
|
||||
"power",
|
||||
],
|
||||
stack_size=1 * 1024,
|
||||
order=130,
|
||||
)
|
12
applications/rpc/application.fam
Normal file
12
applications/rpc/application.fam
Normal file
@@ -0,0 +1,12 @@
|
||||
App(
|
||||
appid="rpc",
|
||||
name="RpcSrv",
|
||||
apptype=FlipperAppType.SERVICE,
|
||||
entry_point="rpc_srv",
|
||||
cdefines=["SRV_RPC"],
|
||||
requires=[
|
||||
"cli",
|
||||
],
|
||||
stack_size=4 * 1024,
|
||||
order=10,
|
||||
)
|
@@ -10,6 +10,7 @@
|
||||
#include "storage/storage.h"
|
||||
#include <stdint.h>
|
||||
#include <lib/toolbox/md5.h>
|
||||
#include <lib/toolbox/path.h>
|
||||
#include <update_util/lfs_backup.h>
|
||||
|
||||
#define TAG "RpcStorage"
|
||||
@@ -100,35 +101,6 @@ static PB_CommandStatus rpc_system_storage_get_file_error(File* file) {
|
||||
return rpc_system_storage_get_error(storage_file_get_error(file));
|
||||
}
|
||||
|
||||
static bool rpc_system_storage_is_filename_correct(const char* path) {
|
||||
const char* name_pos = strrchr(path, '/');
|
||||
if(name_pos == NULL) {
|
||||
name_pos = path;
|
||||
} else {
|
||||
name_pos++;
|
||||
}
|
||||
|
||||
while(*name_pos != '\0') {
|
||||
if((*name_pos >= '0') && (*name_pos <= '9')) {
|
||||
name_pos++;
|
||||
continue;
|
||||
} else if((*name_pos >= 'A') && (*name_pos <= 'Z')) {
|
||||
name_pos++;
|
||||
continue;
|
||||
} else if((*name_pos >= 'a') && (*name_pos <= 'z')) {
|
||||
name_pos++;
|
||||
continue;
|
||||
} else if(strchr(".!#\\$%&'()-@^_`{}~", *name_pos) != NULL) {
|
||||
name_pos++;
|
||||
continue;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void rpc_system_storage_info_process(const PB_Main* request, void* context) {
|
||||
furi_assert(request);
|
||||
furi_assert(context);
|
||||
@@ -274,7 +246,7 @@ static void rpc_system_storage_list_process(const PB_Main* request, void* contex
|
||||
FileInfo fileinfo;
|
||||
char* name = malloc(MAX_NAME_LENGTH + 1);
|
||||
if(storage_dir_read(dir, &fileinfo, name, MAX_NAME_LENGTH)) {
|
||||
if(rpc_system_storage_is_filename_correct(name)) {
|
||||
if(path_contains_only_ascii(name)) {
|
||||
if(i == COUNT_OF(list->file)) {
|
||||
list->file_count = i;
|
||||
response.has_next = true;
|
||||
@@ -379,7 +351,7 @@ static void rpc_system_storage_write_process(const PB_Main* request, void* conte
|
||||
|
||||
bool result = true;
|
||||
|
||||
if(!rpc_system_storage_is_filename_correct(request->content.storage_write_request.path)) {
|
||||
if(!path_contains_only_ascii(request->content.storage_write_request.path)) {
|
||||
rpc_storage->current_command_id = request->command_id;
|
||||
rpc_send_and_release_empty(
|
||||
session, rpc_storage->current_command_id, PB_CommandStatus_ERROR_STORAGE_INVALID_NAME);
|
||||
@@ -433,7 +405,7 @@ static bool rpc_system_storage_is_dir_is_empty(Storage* fs_api, const char* path
|
||||
if(storage_dir_open(dir, path)) {
|
||||
char* name = malloc(MAX_NAME_LENGTH);
|
||||
while(storage_dir_read(dir, &fileinfo, name, MAX_NAME_LENGTH)) {
|
||||
if(rpc_system_storage_is_filename_correct(name)) {
|
||||
if(path_contains_only_ascii(name)) {
|
||||
is_dir_is_empty = false;
|
||||
break;
|
||||
}
|
||||
@@ -505,7 +477,7 @@ static void rpc_system_storage_mkdir_process(const PB_Main* request, void* conte
|
||||
Storage* fs_api = furi_record_open("storage");
|
||||
char* path = request->content.storage_mkdir_request.path;
|
||||
if(path) {
|
||||
if(rpc_system_storage_is_filename_correct(path)) {
|
||||
if(path_contains_only_ascii(path)) {
|
||||
FS_Error error = storage_common_mkdir(fs_api, path);
|
||||
status = rpc_system_storage_get_error(error);
|
||||
} else {
|
||||
@@ -602,7 +574,7 @@ static void rpc_system_storage_rename_process(const PB_Main* request, void* cont
|
||||
|
||||
Storage* fs_api = furi_record_open("storage");
|
||||
|
||||
if(rpc_system_storage_is_filename_correct(request->content.storage_rename_request.new_path)) {
|
||||
if(path_contains_only_ascii(request->content.storage_rename_request.new_path)) {
|
||||
FS_Error error = storage_common_rename(
|
||||
fs_api,
|
||||
request->content.storage_rename_request.old_path,
|
||||
|
11
applications/snake_game/application.fam
Normal file
11
applications/snake_game/application.fam
Normal file
@@ -0,0 +1,11 @@
|
||||
App(
|
||||
appid="snake_game",
|
||||
name="Snake Game",
|
||||
apptype=FlipperAppType.PLUGIN,
|
||||
entry_point="snake_game_app",
|
||||
cdefines=["APP_SNAKE_GAME"],
|
||||
requires=["gui"],
|
||||
stack_size=1 * 1024,
|
||||
icon="A_Plugins_14",
|
||||
order=30,
|
||||
)
|
19
applications/storage/application.fam
Normal file
19
applications/storage/application.fam
Normal file
@@ -0,0 +1,19 @@
|
||||
App(
|
||||
appid="storage",
|
||||
name="StorageSrv",
|
||||
apptype=FlipperAppType.SERVICE,
|
||||
entry_point="storage_srv",
|
||||
cdefines=["SRV_STORAGE"],
|
||||
requires=["storage_settings"],
|
||||
provides=["storage_start"],
|
||||
stack_size=3 * 1024,
|
||||
order=120,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="storage_start",
|
||||
apptype=FlipperAppType.STARTUP,
|
||||
entry_point="storage_on_system_start",
|
||||
requires=["storage"],
|
||||
order=90,
|
||||
)
|
9
applications/storage_settings/application.fam
Normal file
9
applications/storage_settings/application.fam
Normal file
@@ -0,0 +1,9 @@
|
||||
App(
|
||||
appid="storage_settings",
|
||||
name="Storage",
|
||||
apptype=FlipperAppType.SETTINGS,
|
||||
entry_point="storage_settings_app",
|
||||
requires=["storage"],
|
||||
stack_size=2 * 1024,
|
||||
order=30,
|
||||
)
|
24
applications/subghz/application.fam
Normal file
24
applications/subghz/application.fam
Normal file
@@ -0,0 +1,24 @@
|
||||
App(
|
||||
appid="subghz",
|
||||
name="Sub-GHz",
|
||||
apptype=FlipperAppType.APP,
|
||||
entry_point="subghz_app",
|
||||
cdefines=["APP_SUBGHZ"],
|
||||
requires=[
|
||||
"gui",
|
||||
"cli",
|
||||
"dialogs",
|
||||
],
|
||||
provides=["subghz_start"],
|
||||
icon="A_Sub1ghz_14",
|
||||
stack_size=2 * 1024,
|
||||
order=10,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="subghz_start",
|
||||
apptype=FlipperAppType.STARTUP,
|
||||
entry_point="subghz_on_system_start",
|
||||
requires=["subghz"],
|
||||
order=40,
|
||||
)
|
@@ -1,6 +1,6 @@
|
||||
#include "../subghz_i.h"
|
||||
#include "../helpers/subghz_custom_event.h"
|
||||
#include "dolphin/helpers/dolphin_deed.h"
|
||||
#include <dolphin/helpers/dolphin_deed.h>
|
||||
#include <dolphin/dolphin.h>
|
||||
|
||||
void subghz_scene_save_success_popup_callback(void* context) {
|
||||
|
9
applications/system/application.fam
Normal file
9
applications/system/application.fam
Normal file
@@ -0,0 +1,9 @@
|
||||
App(
|
||||
appid="system_settings",
|
||||
name="System",
|
||||
apptype=FlipperAppType.SETTINGS,
|
||||
entry_point="system_settings_app",
|
||||
requires=["gui"],
|
||||
stack_size=1 * 1024,
|
||||
order=70,
|
||||
)
|
14
applications/u2f/application.fam
Normal file
14
applications/u2f/application.fam
Normal file
@@ -0,0 +1,14 @@
|
||||
App(
|
||||
appid="u2f",
|
||||
name="U2F",
|
||||
apptype=FlipperAppType.APP,
|
||||
entry_point="u2f_app",
|
||||
cdefines=["APP_U2F"],
|
||||
requires=[
|
||||
"gui",
|
||||
"dialogs",
|
||||
],
|
||||
stack_size=2 * 1024,
|
||||
icon="A_U2F_14",
|
||||
order=80,
|
||||
)
|
18
applications/unit_tests/application.fam
Normal file
18
applications/unit_tests/application.fam
Normal file
@@ -0,0 +1,18 @@
|
||||
App(
|
||||
appid="unit_tests",
|
||||
apptype=FlipperAppType.STARTUP,
|
||||
entry_point="unit_tests_on_system_start",
|
||||
cdefines=["APP_UNIT_TESTS"],
|
||||
provides=["delay_test"],
|
||||
order=100,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="delay_test",
|
||||
name="Delay Test",
|
||||
apptype=FlipperAppType.DEBUG,
|
||||
entry_point="delay_test_app",
|
||||
stack_size=1 * 1024,
|
||||
requires=["unit_tests"],
|
||||
order=110,
|
||||
)
|
@@ -16,6 +16,7 @@
|
||||
#include <pb_encode.h>
|
||||
#include <m-list.h>
|
||||
#include <lib/toolbox/md5.h>
|
||||
#include <lib/toolbox/path.h>
|
||||
#include <cli/cli.h>
|
||||
#include <loader/loader.h>
|
||||
#include <protobuf_version.h>
|
||||
@@ -495,7 +496,7 @@ static void test_rpc_compare_messages(PB_Main* result, PB_Main* expected) {
|
||||
case PB_Main_storage_list_response_tag: {
|
||||
size_t expected_msg_files = expected->content.storage_list_response.file_count;
|
||||
size_t result_msg_files = result->content.storage_list_response.file_count;
|
||||
mu_check(result_msg_files == expected_msg_files);
|
||||
mu_assert_int_eq(expected_msg_files, result_msg_files);
|
||||
for(size_t i = 0; i < expected_msg_files; ++i) {
|
||||
PB_Storage_File* result_msg_file = &result->content.storage_list_response.file[i];
|
||||
PB_Storage_File* expected_msg_file = &expected->content.storage_list_response.file[i];
|
||||
@@ -603,13 +604,17 @@ static void test_rpc_storage_list_create_expected_list(
|
||||
MsgList_push_back(msg_list, response);
|
||||
i = 0;
|
||||
}
|
||||
list->file[i].type = (fileinfo.flags & FSF_DIRECTORY) ? PB_Storage_File_FileType_DIR :
|
||||
PB_Storage_File_FileType_FILE;
|
||||
list->file[i].size = fileinfo.size;
|
||||
list->file[i].data = NULL;
|
||||
/* memory free inside rpc_encode_and_send() -> pb_release() */
|
||||
list->file[i].name = name;
|
||||
++i;
|
||||
|
||||
if(path_contains_only_ascii(name)) {
|
||||
list->file[i].type = (fileinfo.flags & FSF_DIRECTORY) ?
|
||||
PB_Storage_File_FileType_DIR :
|
||||
PB_Storage_File_FileType_FILE;
|
||||
list->file[i].size = fileinfo.size;
|
||||
list->file[i].data = NULL;
|
||||
/* memory free inside rpc_encode_and_send() -> pb_release() */
|
||||
list->file[i].name = name;
|
||||
++i;
|
||||
}
|
||||
} else {
|
||||
finish = true;
|
||||
free(name);
|
||||
|
@@ -32,7 +32,7 @@ void minunit_print_progress(void) {
|
||||
}
|
||||
|
||||
void minunit_print_fail(const char* str) {
|
||||
printf(FURI_LOG_CLR_E "%s\n" FURI_LOG_CLR_RESET, str);
|
||||
printf(FURI_LOG_CLR_E "%s\r\n" FURI_LOG_CLR_RESET, str);
|
||||
}
|
||||
|
||||
void unit_tests_cli(Cli* cli, string_t args, void* context) {
|
||||
|
39
applications/updater/application.fam
Normal file
39
applications/updater/application.fam
Normal file
@@ -0,0 +1,39 @@
|
||||
App(
|
||||
appid="updater",
|
||||
name="UpdaterSrv",
|
||||
apptype=FlipperAppType.SERVICE,
|
||||
cdefines=["SRV_UPDATER"],
|
||||
requires=[
|
||||
"gui",
|
||||
"storage",
|
||||
],
|
||||
conflicts=["desktop"],
|
||||
entry_point="updater_srv",
|
||||
stack_size=2 * 1024,
|
||||
order=130,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="updater_app",
|
||||
name="UpdaterApp",
|
||||
apptype=FlipperAppType.SYSTEM,
|
||||
cdefines=["APP_UPDATER"],
|
||||
requires=[
|
||||
"gui",
|
||||
"storage",
|
||||
"bt",
|
||||
],
|
||||
conflicts=["updater"],
|
||||
provides=["updater_start"],
|
||||
entry_point="updater_srv",
|
||||
stack_size=2 * 1024,
|
||||
order=10,
|
||||
)
|
||||
|
||||
App(
|
||||
appid="updater_start",
|
||||
apptype=FlipperAppType.STARTUP,
|
||||
entry_point="updater_on_system_start",
|
||||
requires=["updater_app"],
|
||||
order=110,
|
||||
)
|
Reference in New Issue
Block a user