This commit is contained in:
Willy-JL
2024-02-12 03:16:30 +00:00
37 changed files with 236 additions and 159 deletions
@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
void test_furi_memmgr() {
void* ptr;
+1 -1
View File
@@ -125,7 +125,7 @@ struct InfraredApp {
InfraredProgressView* progress; /**< Custom view for showing brute force progress. */
FuriString* file_path; /**< Full path to the currently loaded file. */
FuriString* button_name; /** Name of the button requested in RPC mode. */
FuriString* button_name; /**< Name of the button requested in RPC mode. */
/** Arbitrary text storage for various inputs. */
char text_store[INFRARED_TEXT_STORE_NUM][INFRARED_TEXT_STORE_SIZE + 1];
InfraredAppState app_state; /**< Application state. */
@@ -57,20 +57,31 @@ bool infrared_brute_force_calculate_messages(InfraredBruteForce* brute_force) {
Storage* storage = furi_record_open(RECORD_STORAGE);
FlipperFormat* ff = flipper_format_buffered_file_alloc(storage);
FuriString* signal_name = furi_string_alloc();
InfraredSignal* signal = infrared_signal_alloc();
do {
if(!flipper_format_buffered_file_open_existing(ff, brute_force->db_filename)) break;
bool signals_valid = false;
while(infrared_signal_read_name(ff, signal_name)) {
signals_valid = infrared_signal_read_body(signal, ff) &&
infrared_signal_is_valid(signal);
if(!signals_valid) break;
success = flipper_format_buffered_file_open_existing(ff, brute_force->db_filename);
if(success) {
FuriString* signal_name;
signal_name = furi_string_alloc();
while(flipper_format_read_string(ff, "name", signal_name)) {
InfraredBruteForceRecord* record =
InfraredBruteForceRecordDict_get(brute_force->records, signal_name);
if(record) { //-V547
++(record->count);
}
}
furi_string_free(signal_name);
}
if(!signals_valid) break;
success = true;
} while(false);
infrared_signal_free(signal);
furi_string_free(signal_name);
flipper_format_free(ff);
furi_record_close(RECORD_STORAGE);
+67 -35
View File
@@ -8,7 +8,23 @@
#define TAG "InfraredSignal"
// Common keys
#define INFRARED_SIGNAL_NAME_KEY "name"
#define INFRARED_SIGNAL_TYPE_KEY "type"
// Type key values
#define INFRARED_SIGNAL_TYPE_RAW "raw"
#define INFRARED_SIGNAL_TYPE_PARSED "parsed"
// Raw signal keys
#define INFRARED_SIGNAL_DATA_KEY "data"
#define INFRARED_SIGNAL_FREQUENCY_KEY "frequency"
#define INFRARED_SIGNAL_DUTY_CYCLE_KEY "duty_cycle"
// Parsed signal keys
#define INFRARED_SIGNAL_PROTOCOL_KEY "protocol"
#define INFRARED_SIGNAL_ADDRESS_KEY "address"
#define INFRARED_SIGNAL_COMMAND_KEY "command"
struct InfraredSignal {
bool is_raw;
@@ -88,18 +104,23 @@ static bool infrared_signal_is_raw_valid(const InfraredRawSignal* raw) {
static inline bool
infrared_signal_save_message(const InfraredMessage* message, FlipperFormat* ff) {
const char* protocol_name = infrared_get_protocol_name(message->protocol);
return flipper_format_write_string_cstr(ff, "type", "parsed") &&
flipper_format_write_string_cstr(ff, "protocol", protocol_name) &&
flipper_format_write_hex(ff, "address", (uint8_t*)&message->address, 4) &&
flipper_format_write_hex(ff, "command", (uint8_t*)&message->command, 4);
return flipper_format_write_string_cstr(
ff, INFRARED_SIGNAL_TYPE_KEY, INFRARED_SIGNAL_TYPE_PARSED) &&
flipper_format_write_string_cstr(ff, INFRARED_SIGNAL_PROTOCOL_KEY, protocol_name) &&
flipper_format_write_hex(
ff, INFRARED_SIGNAL_ADDRESS_KEY, (uint8_t*)&message->address, 4) &&
flipper_format_write_hex(
ff, INFRARED_SIGNAL_COMMAND_KEY, (uint8_t*)&message->command, 4);
}
static inline bool infrared_signal_save_raw(const InfraredRawSignal* raw, FlipperFormat* ff) {
furi_assert(raw->timings_size <= MAX_TIMINGS_AMOUNT);
return flipper_format_write_string_cstr(ff, "type", "raw") &&
flipper_format_write_uint32(ff, "frequency", &raw->frequency, 1) &&
flipper_format_write_float(ff, "duty_cycle", &raw->duty_cycle, 1) &&
flipper_format_write_uint32(ff, "data", raw->timings, raw->timings_size);
return flipper_format_write_string_cstr(
ff, INFRARED_SIGNAL_TYPE_KEY, INFRARED_SIGNAL_TYPE_RAW) &&
flipper_format_write_uint32(ff, INFRARED_SIGNAL_FREQUENCY_KEY, &raw->frequency, 1) &&
flipper_format_write_float(ff, INFRARED_SIGNAL_DUTY_CYCLE_KEY, &raw->duty_cycle, 1) &&
flipper_format_write_uint32(
ff, INFRARED_SIGNAL_DATA_KEY, raw->timings, raw->timings_size);
}
static inline bool infrared_signal_read_message(InfraredSignal* signal, FlipperFormat* ff) {
@@ -108,61 +129,72 @@ static inline bool infrared_signal_read_message(InfraredSignal* signal, FlipperF
bool success = false;
do {
if(!flipper_format_read_string(ff, "protocol", buf)) break;
if(!flipper_format_read_string(ff, INFRARED_SIGNAL_PROTOCOL_KEY, buf)) break;
InfraredMessage message;
message.protocol = infrared_get_protocol_by_name(furi_string_get_cstr(buf));
success = flipper_format_read_hex(ff, "address", (uint8_t*)&message.address, 4) &&
flipper_format_read_hex(ff, "command", (uint8_t*)&message.command, 4) &&
infrared_signal_is_message_valid(&message);
if(!success) break;
if(!flipper_format_read_hex(ff, INFRARED_SIGNAL_ADDRESS_KEY, (uint8_t*)&message.address, 4))
break;
if(!flipper_format_read_hex(ff, INFRARED_SIGNAL_COMMAND_KEY, (uint8_t*)&message.command, 4))
break;
if(!infrared_signal_is_message_valid(&message)) break;
infrared_signal_set_message(signal, &message);
} while(0);
success = true;
} while(false);
furi_string_free(buf);
return success;
}
static inline bool infrared_signal_read_raw(InfraredSignal* signal, FlipperFormat* ff) {
uint32_t timings_size, frequency;
float duty_cycle;
bool success = false;
bool success = flipper_format_read_uint32(ff, "frequency", &frequency, 1) &&
flipper_format_read_float(ff, "duty_cycle", &duty_cycle, 1) &&
flipper_format_get_value_count(ff, "data", &timings_size);
do {
uint32_t frequency;
if(!flipper_format_read_uint32(ff, INFRARED_SIGNAL_FREQUENCY_KEY, &frequency, 1)) break;
if(!success || timings_size > MAX_TIMINGS_AMOUNT) {
return false;
}
float duty_cycle;
if(!flipper_format_read_float(ff, INFRARED_SIGNAL_DUTY_CYCLE_KEY, &duty_cycle, 1)) break;
uint32_t* timings = malloc(sizeof(uint32_t) * timings_size);
success = flipper_format_read_uint32(ff, "data", timings, timings_size);
uint32_t timings_size;
if(!flipper_format_get_value_count(ff, INFRARED_SIGNAL_DATA_KEY, &timings_size)) break;
if(success) {
if(timings_size > MAX_TIMINGS_AMOUNT) break;
uint32_t* timings = malloc(sizeof(uint32_t) * timings_size);
if(!flipper_format_read_uint32(ff, INFRARED_SIGNAL_DATA_KEY, timings, timings_size)) {
free(timings);
break;
}
infrared_signal_set_raw_signal(signal, timings, timings_size, frequency, duty_cycle);
}
free(timings);
success = true;
} while(false);
free(timings);
return success;
}
static bool infrared_signal_read_body(InfraredSignal* signal, FlipperFormat* ff) {
bool infrared_signal_read_body(InfraredSignal* signal, FlipperFormat* ff) {
FuriString* tmp = furi_string_alloc();
bool success = false;
do {
if(!flipper_format_read_string(ff, "type", tmp)) break;
if(furi_string_equal(tmp, "raw")) {
success = infrared_signal_read_raw(signal, ff);
} else if(furi_string_equal(tmp, "parsed")) {
success = infrared_signal_read_message(signal, ff);
if(!flipper_format_read_string(ff, INFRARED_SIGNAL_TYPE_KEY, tmp)) break;
if(furi_string_equal(tmp, INFRARED_SIGNAL_TYPE_RAW)) {
if(!infrared_signal_read_raw(signal, ff)) break;
} else if(furi_string_equal(tmp, INFRARED_SIGNAL_TYPE_PARSED)) {
if(!infrared_signal_read_message(signal, ff)) break;
} else {
FURI_LOG_E(TAG, "Unknown signal type");
FURI_LOG_E(TAG, "Unknown signal type: %s", furi_string_get_cstr(tmp));
break;
}
success = true;
} while(false);
furi_string_free(tmp);
+12 -1
View File
@@ -127,7 +127,7 @@ void infrared_signal_set_message(InfraredSignal* signal, const InfraredMessage*
const InfraredMessage* infrared_signal_get_message(const InfraredSignal* signal);
/**
* @brief Read a signal from a FlipperFormat file into an InfraredSignal instance.
* @brief Read a signal and its name from a FlipperFormat file into an InfraredSignal instance.
*
* The file must be allocated and open prior to this call. The seek position determines
* which signal will be read (if there is more than one in the file). Calling this function
@@ -151,6 +151,17 @@ bool infrared_signal_read(InfraredSignal* signal, FlipperFormat* ff, FuriString*
*/
bool infrared_signal_read_name(FlipperFormat* ff, FuriString* name);
/**
* @brief Read a signal from a FlipperFormat file.
*
* Same behaviour as infrared_signal_read(), but only the body is read.
*
* @param[in,out] ff pointer to the FlipperFormat file instance to read from.
* @param[out] body pointer to the InfraredSignal instance to hold the signal body. Must be properly allocated.
* @returns true if a signal body was successfully read, false otherwise (e.g. syntax error).
*/
bool infrared_signal_read_body(InfraredSignal* signal, FlipperFormat* ff);
/**
* @brief Read a signal with a particular name from a FlipperFormat file into an InfraredSignal instance.
*
@@ -10,7 +10,7 @@ enum SubmenuIndex {
static void nfc_scene_set_type_init_edit_data(Iso14443_3aData* data, size_t uid_len) {
// Easiest way to create a zero'd buffer of given length
uint8_t* uid = malloc(uid_len);
uint8_t* uid = calloc(1, uid_len);
iso14443_3a_set_uid(data, uid, uid_len);
free(uid);
}
+1 -1
View File
@@ -9,7 +9,7 @@
#define DOLPHIN_LOCK_EVENT_FLAG (0x1)
#define TAG "Dolphin"
#define HOURS_IN_TICKS(x) ((x)*60 * 60 * 1000)
#define HOURS_IN_TICKS(x) ((x) * 60 * 60 * 1000)
static void dolphin_update_clear_limits_timer_period(Dolphin* dolphin);
-1
View File
@@ -1,5 +1,4 @@
#include "canvas_i.h"
#include "icon_i.h"
#include "icon_animation_i.h"
#include <furi.h>
+2 -2
View File
@@ -122,7 +122,7 @@ void canvas_draw_u8g2_bitmap(
uint8_t width,
uint8_t height,
const uint8_t* bitmap,
uint8_t rotation);
IconRotation rotation);
/** Add canvas commit callback.
*
@@ -147,4 +147,4 @@ void canvas_remove_framebuffer_callback(
#ifdef __cplusplus
}
#endif
#endif
+3
View File
@@ -395,9 +395,12 @@ static void rpc_system_storage_read_process(const PB_Main* request, void* contex
response->has_next = fs_operation_success && (size_left > 0);
} else {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
response->content.storage_read_response.file.data =
malloc(PB_BYTES_ARRAY_T_ALLOCSIZE(0));
response->content.storage_read_response.file.data->size = 0;
#pragma GCC diagnostic pop
response->content.storage_read_response.has_file = true;
response->has_next = false;
fs_operation_success = true;
+2 -1
View File
@@ -41,7 +41,8 @@ COPRO_STACK_ADDR = "0x0"
COPRO_STACK_BIN_DIR = posixpath.join(COPRO_CUBE_DIR, "firmware")
# Supported toolchain versions
FBT_TOOLCHAIN_VERSIONS = (" 10.3.",)
# Also specify in scripts/ufbt/SConstruct
FBT_TOOLCHAIN_VERSIONS = (" 12.3.", " 13.2.")
OPENOCD_OPTS = [
"-f",
+4
View File
@@ -13,6 +13,10 @@ extern "C" {
#define FURI_WARN_UNUSED __attribute__((warn_unused_result))
#endif
#ifndef FURI_DEPRECATED
#define FURI_DEPRECATED __attribute__((deprecated))
#endif
#ifndef FURI_WEAK
#define FURI_WEAK __attribute__((weak))
#endif
+3 -3
View File
@@ -84,9 +84,9 @@ extern "C" {
#endif
#ifndef REVERSE_BYTES_U32
#define REVERSE_BYTES_U32(x) \
((((x)&0x000000FF) << 24) | (((x)&0x0000FF00) << 8) | (((x)&0x00FF0000) >> 8) | \
(((x)&0xFF000000) >> 24))
#define REVERSE_BYTES_U32(x) \
((((x) & 0x000000FF) << 24) | (((x) & 0x0000FF00) << 8) | (((x) & 0x00FF0000) >> 8) | \
(((x) & 0xFF000000) >> 24))
#endif
#ifndef FURI_BIT
+16 -15
View File
@@ -26,19 +26,20 @@
*tmp_x = y; \
*tmp_x; \
})
#define FURI_CONST_ASSIGN(x, y) \
_Generic((x), signed char \
: FURI_CONST_ASSIGN_(signed char, x, y), unsigned char \
: FURI_CONST_ASSIGN_(unsigned char, x, y), short \
: FURI_CONST_ASSIGN_(short, x, y), unsigned short \
: FURI_CONST_ASSIGN_(unsigned short, x, y), int \
: FURI_CONST_ASSIGN_(int, x, y), unsigned \
: FURI_CONST_ASSIGN_(unsigned, x, y), long \
: FURI_CONST_ASSIGN_(long, x, y), unsigned long \
: FURI_CONST_ASSIGN_(unsigned long, x, y), long long \
: FURI_CONST_ASSIGN_(long long, x, y), unsigned long long \
: FURI_CONST_ASSIGN_(unsigned long long, x, y), float \
: FURI_CONST_ASSIGN_(float, x, y), double \
: FURI_CONST_ASSIGN_(double, x, y), long double \
: FURI_CONST_ASSIGN_(long double, x, y))
#define FURI_CONST_ASSIGN(x, y) \
_Generic( \
(x), \
signed char: FURI_CONST_ASSIGN_(signed char, x, y), \
unsigned char: FURI_CONST_ASSIGN_(unsigned char, x, y), \
short: FURI_CONST_ASSIGN_(short, x, y), \
unsigned short: FURI_CONST_ASSIGN_(unsigned short, x, y), \
int: FURI_CONST_ASSIGN_(int, x, y), \
unsigned: FURI_CONST_ASSIGN_(unsigned, x, y), \
long: FURI_CONST_ASSIGN_(long, x, y), \
unsigned long: FURI_CONST_ASSIGN_(unsigned long, x, y), \
long long: FURI_CONST_ASSIGN_(long long, x, y), \
unsigned long long: FURI_CONST_ASSIGN_(unsigned long long, x, y), \
float: FURI_CONST_ASSIGN_(float, x, y), \
double: FURI_CONST_ASSIGN_(double, x, y), \
long double: FURI_CONST_ASSIGN_(long double, x, y))
#endif
+12 -8
View File
@@ -568,26 +568,30 @@ void furi_string_utf8_decode(char c, FuriStringUTF8State* state, FuriStringUnico
/**
* @brief Select for 1 argument
*/
#define FURI_STRING_SELECT1(func1, func2, a) \
_Generic((a), char* : func2, const char* : func2, FuriString* : func1, const FuriString* : func1)(a)
#define FURI_STRING_SELECT1(func1, func2, a) \
_Generic((a), char*: func2, const char*: func2, FuriString*: func1, const FuriString*: func1)( \
a)
/**
* @brief Select for 2 arguments
*/
#define FURI_STRING_SELECT2(func1, func2, a, b) \
_Generic((b), char* : func2, const char* : func2, FuriString* : func1, const FuriString* : func1)(a, b)
#define FURI_STRING_SELECT2(func1, func2, a, b) \
_Generic((b), char*: func2, const char*: func2, FuriString*: func1, const FuriString*: func1)( \
a, b)
/**
* @brief Select for 3 arguments
*/
#define FURI_STRING_SELECT3(func1, func2, a, b, c) \
_Generic((b), char* : func2, const char* : func2, FuriString* : func1, const FuriString* : func1)(a, b, c)
#define FURI_STRING_SELECT3(func1, func2, a, b, c) \
_Generic((b), char*: func2, const char*: func2, FuriString*: func1, const FuriString*: func1)( \
a, b, c)
/**
* @brief Select for 4 arguments
*/
#define FURI_STRING_SELECT4(func1, func2, a, b, c, d) \
_Generic((b), char* : func2, const char* : func2, FuriString* : func1, const FuriString* : func1)(a, b, c, d)
#define FURI_STRING_SELECT4(func1, func2, a, b, c, d) \
_Generic((b), char*: func2, const char*: func2, FuriString*: func1, const FuriString*: func1)( \
a, b, c, d)
/**
* @brief Allocate new FuriString and set it content to string (or C string).
+3 -3
View File
@@ -26,9 +26,9 @@ extern "C" {
// DigitalSignal uses 10 picosecond time units (1 tick = 10 ps).
// Use the macros below to convert the time from other units.
#define DIGITAL_SIGNAL_MS(x) ((x)*100000000UL)
#define DIGITAL_SIGNAL_US(x) ((x)*100000UL)
#define DIGITAL_SIGNAL_NS(x) ((x)*100UL)
#define DIGITAL_SIGNAL_MS(x) ((x) * 100000000UL)
#define DIGITAL_SIGNAL_US(x) ((x) * 100000UL)
#define DIGITAL_SIGNAL_NS(x) ((x) * 100UL)
#define DIGITAL_SIGNAL_PS(x) ((x) / 10UL)
typedef struct DigitalSignal DigitalSignal;
@@ -11,7 +11,7 @@ extern "C" {
#define ISO14443_3A_POLLER_MAX_BUFFER_SIZE (512U)
#define ISO14443_3A_POLLER_SEL_CMD(cascade_lvl) (0x93 + 2 * (cascade_lvl))
#define ISO14443_3A_POLLER_SEL_PAR(bytes, bits) (((bytes) << 4 & 0xf0U) | ((bits)&0x0fU))
#define ISO14443_3A_POLLER_SEL_PAR(bytes, bits) (((bytes) << 4 & 0xf0U) | ((bits) & 0x0fU))
#define ISO14443_3A_POLLER_SDD_CL (0x88U)
typedef enum {
+1 -1
View File
@@ -6,7 +6,7 @@
// Algorithm from https://github.com/RfidResearchGroup/proxmark3.git
#define SWAPENDIAN(x) \
((x) = ((x) >> 8 & 0xff00ff) | ((x)&0xff00ff) << 8, (x) = (x) >> 16 | (x) << 16)
((x) = ((x) >> 8 & 0xff00ff) | ((x) & 0xff00ff) << 8, (x) = (x) >> 16 | (x) << 16)
#define LF_POLY_ODD (0x29CE5C)
#define LF_POLY_EVEN (0x870804)
+2 -2
View File
@@ -212,8 +212,8 @@ uint32_t pulse_reader_receive(PulseReader* signal, int timeout_us) {
/* probably larger values, so choose a wider data type */
if(signal->unit_divider > 1) {
delta_unit =
(uint32_t)((uint64_t)delta * (uint64_t)signal->unit_multiplier / signal->unit_divider);
delta_unit = (uint32_t)((uint64_t)delta * (uint64_t)signal->unit_multiplier /
signal->unit_divider);
} else {
delta_unit = delta * signal->unit_multiplier;
}
+2 -2
View File
@@ -688,8 +688,8 @@ uint8_t u8x8_byte_sed1520(u8x8_t* u8x8, uint8_t msg, uint8_t arg_int, void* arg_
#define U8X8_MSG_GPIO(x) (64 + (x))
#ifdef U8X8_USE_PINS
#define u8x8_GetPinIndex(u8x8, msg) ((msg)&0x3f)
#define u8x8_GetPinValue(u8x8, msg) ((u8x8)->pins[(msg)&0x3f])
#define u8x8_GetPinIndex(u8x8, msg) ((msg) & 0x3f)
#define u8x8_GetPinValue(u8x8, msg) ((u8x8)->pins[(msg) & 0x3f])
#endif
#define U8X8_MSG_GPIO_D0 U8X8_MSG_GPIO(U8X8_PIN_D0)
+10
View File
@@ -0,0 +1,10 @@
#Flipper Zero serial port
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", ATTRS{manufacturer}=="Flipper Devices Inc.", TAG+="uaccess", GROUP="dialout"
#Flipper Zero DFU
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", ATTRS{manufacturer}=="STMicroelectronics", TAG+="uaccess", GROUP="dialout"
#Flipper ESP32s2 BlackMagic
SUBSYSTEMS=="usb", ATTRS{idVendor}=="303a", ATTRS{idProduct}=="40??", ATTRS{manufacturer}=="Flipper Devices Inc.", TAG+="uaccess", GROUP="dialout"
#Flipper U2F
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5741", ATTRS{manufacturer}=="Flipper Devices Inc.", ENV{ID_SECURITY_TOKEN}="1"
#ST-Link-V3
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="37??", ATTRS{manufacturer}=="STMicroelectronics", TAG+="uaccess", GROUP="dialout"
+1 -1
View File
@@ -1,7 +1,7 @@
def generate(env):
env.SetDefault(
GDB="gdb",
GDBPY="gdb-py",
GDBPY="gdb-py3",
GDBCOM="$GDB $GDBOPTS $SOURCES", # no $TARGET
GDBPYCOM="$GDBPY $GDBOPTS $GDBPYOPTS $SOURCES", # no $TARGET
)
+2 -2
View File
@@ -13,7 +13,7 @@ if not ["%FBT_NOENV%"] == [""] (
exit /b 0
)
set "FLIPPER_TOOLCHAIN_VERSION=23"
set "FLIPPER_TOOLCHAIN_VERSION=28"
if ["%FBT_TOOLCHAIN_PATH%"] == [""] (
set "FBT_TOOLCHAIN_PATH=%FBT_ROOT%"
@@ -46,7 +46,7 @@ set "HOME=%USERPROFILE%"
set "PYTHONHOME=%FBT_TOOLCHAIN_ROOT%\python"
set "PYTHONPATH="
set "PYTHONNOUSERSITE=1"
set "PATH=%FBT_TOOLCHAIN_ROOT%\python;%FBT_TOOLCHAIN_ROOT%\bin;%FBT_TOOLCHAIN_ROOT%\protoc\bin;%FBT_TOOLCHAIN_ROOT%\openocd\bin;%PATH%"
set "PATH=%FBT_TOOLCHAIN_ROOT%\bin;%FBT_TOOLCHAIN_ROOT%\python;%PATH%"
set "PROMPT=(fbt) %PROMPT%"
:already_set
+15 -51
View File
@@ -4,7 +4,7 @@
# public variables
DEFAULT_SCRIPT_PATH="$(pwd -P)";
FBT_TOOLCHAIN_VERSION="${FBT_TOOLCHAIN_VERSION:-"23"}";
FBT_TOOLCHAIN_VERSION="${FBT_TOOLCHAIN_VERSION:-"28"}";
if [ -z ${FBT_TOOLCHAIN_PATH+x} ] ; then
FBT_TOOLCHAIN_PATH_WAS_SET=0;
@@ -27,7 +27,7 @@ fbtenv_show_usage()
fbtenv_curl()
{
curl --progress-bar -SLo "$1" "$2";
curl --progress-bar -SLo "$1" "$2" -w "%{http_code}" | grep -q 200;
}
fbtenv_wget()
@@ -38,11 +38,7 @@ fbtenv_wget()
fbtenv_restore_env()
{
TOOLCHAIN_ARCH_DIR_SED="$(echo "$TOOLCHAIN_ARCH_DIR" | sed 's/\//\\\//g')"
PATH="$(echo "$PATH" | sed "s/$TOOLCHAIN_ARCH_DIR_SED\/python\/bin://g")";
PATH="$(echo "$PATH" | sed "s/$TOOLCHAIN_ARCH_DIR_SED\/bin://g")";
PATH="$(echo "$PATH" | sed "s/$TOOLCHAIN_ARCH_DIR_SED\/protobuf\/bin://g")";
PATH="$(echo "$PATH" | sed "s/$TOOLCHAIN_ARCH_DIR_SED\/openocd\/bin://g")";
PATH="$(echo "$PATH" | sed "s/$TOOLCHAIN_ARCH_DIR_SED\/openssl\/bin://g")";
if [ -n "${PS1:-""}" ]; then
PS1="$(echo "$PS1" | sed 's/\[fbt\]//g')";
elif [ -n "${PROMPT:-""}" ]; then
@@ -57,7 +53,7 @@ fbtenv_restore_env()
unset REQUESTS_CA_BUNDLE;
fi
if [ "$SYS_TYPE" = "Linux" ]; then
if [ "$SYS_TYPE" = "linux" ]; then
if [ -n "$SAVED_TERMINFO_DIRS" ]; then
export TERMINFO_DIRS="$SAVED_TERMINFO_DIRS";
else
@@ -135,48 +131,17 @@ fbtenv_check_env_vars()
fbtenv_get_kernel_type()
{
SYS_TYPE="$(uname -s)";
SYS_TYPE="$(uname -s | tr '[:upper:]' '[:lower:]')";
ARCH_TYPE="$(uname -m)";
if [ "$ARCH_TYPE" != "x86_64" ] && [ "$SYS_TYPE" != "Darwin" ]; then
echo "We only provide toolchain for x86_64 CPUs, sorry..";
return 1;
fi
if [ "$SYS_TYPE" = "Darwin" ]; then
fbtenv_check_rosetta || return 1;
TOOLCHAIN_ARCH_DIR="$FBT_TOOLCHAIN_PATH/toolchain/x86_64-darwin";
if [ -z "${FBT_TOOLS_CUSTOM_LINK:-}" ]; then
TOOLCHAIN_URL="https://update.flipperzero.one/builds/toolchain/gcc-arm-none-eabi-10.3-x86_64-darwin-flipper-$FBT_TOOLCHAIN_VERSION.tar.gz";
else
echo "info: custom toolchain link is used";
TOOLCHAIN_URL=$FBT_TOOLS_CUSTOM_LINK;
fi
elif [ "$SYS_TYPE" = "Linux" ]; then
TOOLCHAIN_ARCH_DIR="$FBT_TOOLCHAIN_PATH/toolchain/x86_64-linux";
if [ -z "${FBT_TOOLS_CUSTOM_LINK:-}" ]; then
TOOLCHAIN_URL="https://update.flipperzero.one/builds/toolchain/gcc-arm-none-eabi-10.3-x86_64-linux-flipper-$FBT_TOOLCHAIN_VERSION.tar.gz";
else
echo "info: custom toolchain link is used";
TOOLCHAIN_URL=$FBT_TOOLS_CUSTOM_LINK;
fi
elif echo "$SYS_TYPE" | grep -q "MINGW"; then
if echo "$SYS_TYPE" | grep -q "MINGW"; then
echo "In MinGW shell, use \"[u]fbt.cmd\" instead of \"[u]fbt\"";
return 1;
else
elif [ $SYS_TYPE != "linux" ] && [ $SYS_TYPE != "darwin" ]; then
echo "Your system configuration is not supported. Sorry.. Please report us your configuration.";
return 1;
fi
return 0;
}
fbtenv_check_rosetta()
{
if [ "$ARCH_TYPE" = "arm64" ]; then
if ! pgrep -q oahd; then
echo "Flipper Zero Toolchain needs Rosetta2 to run under Apple Silicon";
echo "Please install it by typing 'softwareupdate --install-rosetta --agree-to-license'";
return 1;
fi
fi
TOOLCHAIN_ARCH_DIR="$FBT_TOOLCHAIN_PATH/toolchain/$ARCH_TYPE-$SYS_TYPE";
TOOLCHAIN_URL="https://update.flipperzero.one/builds/toolchain/gcc-arm-none-eabi-12.3-$ARCH_TYPE-$SYS_TYPE-flipper-$FBT_TOOLCHAIN_VERSION.tar.gz";
return 0;
}
@@ -206,7 +171,10 @@ fbtenv_download_toolchain_tar()
{
echo "Downloading toolchain:";
mkdir -p "$FBT_TOOLCHAIN_PATH/toolchain" || return 1;
"$FBT_DOWNLOADER" "$FBT_TOOLCHAIN_PATH/toolchain/$TOOLCHAIN_TAR.part" "$TOOLCHAIN_URL" || return 1;
"$FBT_DOWNLOADER" "$FBT_TOOLCHAIN_PATH/toolchain/$TOOLCHAIN_TAR.part" "$TOOLCHAIN_URL" || {
echo "Failed to download $TOOLCHAIN_URL";
return 1;
};
# restoring oroginal filename if file downloaded successfully
mv "$FBT_TOOLCHAIN_PATH/toolchain/$TOOLCHAIN_TAR.part" "$FBT_TOOLCHAIN_PATH/toolchain/$TOOLCHAIN_TAR"
echo "done";
@@ -338,11 +306,7 @@ fbtenv_main()
fbtenv_check_download_toolchain || return 1;
fbtenv_set_shell_prompt;
fbtenv_print_config;
PATH="$TOOLCHAIN_ARCH_DIR/python/bin:$PATH";
PATH="$TOOLCHAIN_ARCH_DIR/bin:$PATH";
PATH="$TOOLCHAIN_ARCH_DIR/protobuf/bin:$PATH";
PATH="$TOOLCHAIN_ARCH_DIR/openocd/bin:$PATH";
PATH="$TOOLCHAIN_ARCH_DIR/openssl/bin:$PATH";
export PATH;
export SAVED_SSL_CERT_FILE="${SSL_CERT_FILE:-""}";
@@ -351,15 +315,15 @@ fbtenv_main()
export SAVED_PYTHONPATH="${PYTHONPATH:-""}";
export SAVED_PYTHONHOME="${PYTHONHOME:-""}";
export SSL_CERT_FILE="$TOOLCHAIN_ARCH_DIR/python/lib/python3.11/site-packages/certifi/cacert.pem";
export SSL_CERT_FILE="$TOOLCHAIN_ARCH_DIR/lib/python3.11/site-packages/certifi/cacert.pem";
export REQUESTS_CA_BUNDLE="$SSL_CERT_FILE";
export PYTHONNOUSERSITE=1;
export PYTHONPATH=;
export PYTHONHOME=;
if [ "$SYS_TYPE" = "Linux" ]; then
if [ "$SYS_TYPE" = "linux" ]; then
export SAVED_TERMINFO_DIRS="${TERMINFO_DIRS:-""}";
export TERMINFO_DIRS="$TOOLCHAIN_ARCH_DIR/ncurses/share/terminfo";
export TERMINFO_DIRS="$TOOLCHAIN_ARCH_DIR/share/terminfo";
fi
}
@@ -6,8 +6,8 @@ $download_dir = (Get-Item "$PSScriptRoot\..\..").FullName
$toolchain_version = $args[0]
$toolchain_target_path = $args[1]
$toolchain_url = "https://update.flipperzero.one/builds/toolchain/gcc-arm-none-eabi-10.3-x86_64-windows-flipper-$toolchain_version.zip"
$toolchain_dist_folder = "gcc-arm-none-eabi-10.3-x86_64-windows-flipper"
$toolchain_url = "https://update.flipperzero.one/builds/toolchain/gcc-arm-none-eabi-12.3-x86_64-windows-flipper-$toolchain_version.zip"
$toolchain_dist_folder = "gcc-arm-none-eabi-12.3-x86_64-windows-flipper"
$toolchain_zip = "$toolchain_dist_folder-$toolchain_version.zip"
$toolchain_zip_temp_path = "$download_dir\$toolchain_zip"
@@ -29,6 +29,11 @@ if (!(Test-Path -LiteralPath "$toolchain_target_path\..")) {
New-Item "$toolchain_target_path\.." -ItemType Directory -Force
}
if (Test-Path -LiteralPath "$toolchain_dist_temp_path") {
Write-Host "Cleaning up temp toolchain path.."
Remove-Item -LiteralPath "$toolchain_dist_temp_path" -Force -Recurse
}
Write-Host -NoNewline "Extracting Windows toolchain.."
# This is faster than Expand-Archive
Add-Type -Assembly "System.IO.Compression.Filesystem"
+2 -2
View File
@@ -74,7 +74,7 @@ env = core_env.Clone(
"crosscc",
{
"toolchain_prefix": "arm-none-eabi-",
"versions": (" 10.3",),
"versions": (" 12.3.", " 13.2."),
},
),
"fwbin",
@@ -361,7 +361,7 @@ for template_file in project_template_dir.Dir(".vscode").glob("*"):
dist_env.WhereIs("arm-none-eabi-gcc")
),
"@UFBT_TOOLCHAIN_GDB_PY@": _path_as_posix(
dist_env.WhereIs("arm-none-eabi-gdb-py")
dist_env.WhereIs("arm-none-eabi-gdb-py3")
),
"@UFBT_TOOLCHAIN_OPENOCD@": _path_as_posix(dist_env.WhereIs("openocd")),
"@UFBT_APP_DIR@": _path_as_posix(original_app_dir.abspath),
+2
View File
@@ -23,6 +23,7 @@ ENV.AppendUnique(
"-Wall",
"-Wextra",
"-Werror",
"-Wno-error=deprecated-declarations",
"-Wno-address-of-packed-member",
"-Wredundant-decls",
"-Wdouble-promotion",
@@ -44,5 +45,6 @@ ENV.AppendUnique(
"-mfpu=fpv4-sp-d16",
"-mlittle-endian",
"-mthumb",
"-Wl,--no-warn-rwx-segment",
],
)
-1
View File
@@ -41,7 +41,6 @@ appenv.AppendUnique(
"-Xlinker",
"-Map=${TARGET}.map",
"-specs=nano.specs",
"-specs=nosys.specs",
],
LIBS=[
"m",
-1
View File
@@ -35,7 +35,6 @@ else:
ENV.AppendUnique(
LINKFLAGS=[
"-specs=nano.specs",
"-specs=nosys.specs",
"-Wl,--gc-sections",
"-Wl,--undefined=uxTopUsedPriority",
"-Wl,--wrap,_malloc_r",
+10 -4
View File
@@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,54.1,,
Version,+,55.1,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,
@@ -176,6 +176,7 @@ Header,+,targets/f7/furi_hal/furi_hal_serial_control.h,,
Header,+,targets/f7/furi_hal/furi_hal_serial_types.h,,
Header,+,targets/f7/furi_hal/furi_hal_spi_types.h,,
Header,+,targets/f7/furi_hal/furi_hal_usb_cdc.h,,
Header,+,targets/f7/platform_specific/cxx_virtual_stub.h,,
Header,+,targets/f7/platform_specific/intrinsic_export.h,,
Header,+,targets/f7/platform_specific/math_wrapper.h,,
Header,+,targets/furi_hal_include/furi_hal.h,,
@@ -306,6 +307,7 @@ Function,+,__aeabi_uldivmod,void*,"uint64_t, uint64_t"
Function,-,__assert,void,"const char*, int, const char*"
Function,+,__assert_func,void,"const char*, int, const char*, const char*"
Function,+,__clear_cache,void,"void*, void*"
Function,+,__cxa_pure_virtual,void,
Function,-,__eprintf,void,"const char*, const char*, unsigned int, const char*"
Function,+,__errno,int*,
Function,-,__fpclassifyd,int,double
@@ -393,6 +395,7 @@ Function,-,_fsetpos_r,int,"_reent*, FILE*, const fpos_t*"
Function,-,_ftell_r,long,"_reent*, FILE*"
Function,-,_ftello_r,_off_t,"_reent*, FILE*"
Function,-,_funopen_r,FILE*,"_reent*, const void*, int (*)(void*, char*, int), int (*)(void*, const char*, int), fpos_t (*)(void*, fpos_t, int), int (*)(void*)"
Function,-,_fwalk_sglue,int,"_reent*, int (*)(_reent*, __FILE*), _glue*"
Function,-,_fwrite_r,size_t,"_reent*, const void*, size_t, size_t, FILE*"
Function,-,_fwrite_unlocked_r,size_t,"_reent*, const void*, size_t, size_t, FILE*"
Function,-,_getc_r,int,"_reent*, FILE*"
@@ -2063,7 +2066,6 @@ Function,+,protocol_dict_get_write_data,_Bool,"ProtocolDict*, size_t, void*"
Function,+,protocol_dict_render_brief_data,void,"ProtocolDict*, FuriString*, size_t"
Function,+,protocol_dict_render_data,void,"ProtocolDict*, FuriString*, size_t"
Function,+,protocol_dict_set_data,void,"ProtocolDict*, size_t, const uint8_t*, size_t"
Function,-,pselect,int,"int, fd_set*, fd_set*, fd_set*, const timespec*, const sigset_t*"
Function,-,pulse_reader_alloc,PulseReader*,"const GpioPin*, uint32_t"
Function,-,pulse_reader_free,void,PulseReader*
Function,-,pulse_reader_receive,uint32_t,"PulseReader*, int"
@@ -2154,7 +2156,6 @@ Function,+,scene_manager_stop,void,SceneManager*
Function,+,sd_api_get_fs_type_text,const char*,SDFsType
Function,-,secure_getenv,char*,const char*
Function,-,seed48,unsigned short*,unsigned short[3]
Function,-,select,int,"int, fd_set*, fd_set*, fd_set*, timeval*"
Function,-,serial_svc_is_started,_Bool,
Function,-,serial_svc_notify_buffer_is_empty,void,
Function,-,serial_svc_set_callbacks,void,"uint16_t, SerialServiceEventCallback, void*"
@@ -2564,8 +2565,13 @@ Variable,-,ITM_RxBuffer,volatile int32_t,
Variable,-,MSIRangeTable,const uint32_t[16],
Variable,-,SmpsPrescalerTable,const uint32_t[4][6],
Variable,+,SystemCoreClock,uint32_t,
Variable,-,__atexit,_atexit*,
Variable,-,__atexit0,_atexit,
Variable,-,__sf,__FILE[3],
Variable,-,__sglue,_glue,
Variable,-,__stdio_exit_handler,void (*)(),
Variable,+,_ctype_,const char[],
Variable,+,_global_impure_ptr,_reent*,
Variable,+,_impure_data,_reent,
Variable,+,_impure_ptr,_reent*,
Variable,-,_sys_errlist,const char*[],
Variable,-,_sys_nerr,int,
1 entry status name type params
2 Version + 54.1 55.1
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
176 Header + targets/f7/furi_hal/furi_hal_serial_types.h
177 Header + targets/f7/furi_hal/furi_hal_spi_types.h
178 Header + targets/f7/furi_hal/furi_hal_usb_cdc.h
179 Header + targets/f7/platform_specific/cxx_virtual_stub.h
180 Header + targets/f7/platform_specific/intrinsic_export.h
181 Header + targets/f7/platform_specific/math_wrapper.h
182 Header + targets/furi_hal_include/furi_hal.h
307 Function - __assert void const char*, int, const char*
308 Function + __assert_func void const char*, int, const char*, const char*
309 Function + __clear_cache void void*, void*
310 Function + __cxa_pure_virtual void
311 Function - __eprintf void const char*, const char*, unsigned int, const char*
312 Function + __errno int*
313 Function - __fpclassifyd int double
395 Function - _ftell_r long _reent*, FILE*
396 Function - _ftello_r _off_t _reent*, FILE*
397 Function - _funopen_r FILE* _reent*, const void*, int (*)(void*, char*, int), int (*)(void*, const char*, int), fpos_t (*)(void*, fpos_t, int), int (*)(void*)
398 Function - _fwalk_sglue int _reent*, int (*)(_reent*, __FILE*), _glue*
399 Function - _fwrite_r size_t _reent*, const void*, size_t, size_t, FILE*
400 Function - _fwrite_unlocked_r size_t _reent*, const void*, size_t, size_t, FILE*
401 Function - _getc_r int _reent*, FILE*
2066 Function + protocol_dict_render_brief_data void ProtocolDict*, FuriString*, size_t
2067 Function + protocol_dict_render_data void ProtocolDict*, FuriString*, size_t
2068 Function + protocol_dict_set_data void ProtocolDict*, size_t, const uint8_t*, size_t
Function - pselect int int, fd_set*, fd_set*, fd_set*, const timespec*, const sigset_t*
2069 Function - pulse_reader_alloc PulseReader* const GpioPin*, uint32_t
2070 Function - pulse_reader_free void PulseReader*
2071 Function - pulse_reader_receive uint32_t PulseReader*, int
2156 Function + sd_api_get_fs_type_text const char* SDFsType
2157 Function - secure_getenv char* const char*
2158 Function - seed48 unsigned short* unsigned short[3]
Function - select int int, fd_set*, fd_set*, fd_set*, timeval*
2159 Function - serial_svc_is_started _Bool
2160 Function - serial_svc_notify_buffer_is_empty void
2161 Function - serial_svc_set_callbacks void uint16_t, SerialServiceEventCallback, void*
2565 Variable - MSIRangeTable const uint32_t[16]
2566 Variable - SmpsPrescalerTable const uint32_t[4][6]
2567 Variable + SystemCoreClock uint32_t
2568 Variable - __atexit _atexit*
2569 Variable - __atexit0 _atexit
2570 Variable - __sf __FILE[3]
2571 Variable - __sglue _glue
2572 Variable - __stdio_exit_handler void (*)()
2573 Variable + _ctype_ const char[]
2574 Variable + _global_impure_ptr _impure_data _reent* _reent
2575 Variable + _impure_ptr _reent*
2576 Variable - _sys_errlist const char*[]
2577 Variable - _sys_nerr int
+10 -4
View File
@@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,54.1,,
Version,+,55.1,,
Header,+,applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h,,
Header,+,applications/main/archive/helpers/archive_helpers_ext.h,,
Header,+,applications/main/subghz/subghz_fap.h,,
@@ -254,6 +254,7 @@ Header,+,targets/f7/furi_hal/furi_hal_spi_types.h,,
Header,+,targets/f7/furi_hal/furi_hal_subghz.h,,
Header,+,targets/f7/furi_hal/furi_hal_target_hw.h,,
Header,+,targets/f7/furi_hal/furi_hal_usb_cdc.h,,
Header,+,targets/f7/platform_specific/cxx_virtual_stub.h,,
Header,+,targets/f7/platform_specific/intrinsic_export.h,,
Header,+,targets/f7/platform_specific/math_wrapper.h,,
Header,+,targets/furi_hal_include/furi_hal.h,,
@@ -394,6 +395,7 @@ Function,+,__aeabi_uldivmod,void*,"uint64_t, uint64_t"
Function,-,__assert,void,"const char*, int, const char*"
Function,+,__assert_func,void,"const char*, int, const char*, const char*"
Function,+,__clear_cache,void,"void*, void*"
Function,+,__cxa_pure_virtual,void,
Function,-,__eprintf,void,"const char*, const char*, unsigned int, const char*"
Function,+,__errno,int*,
Function,-,__fpclassifyd,int,double
@@ -481,6 +483,7 @@ Function,-,_fsetpos_r,int,"_reent*, FILE*, const fpos_t*"
Function,-,_ftell_r,long,"_reent*, FILE*"
Function,-,_ftello_r,_off_t,"_reent*, FILE*"
Function,-,_funopen_r,FILE*,"_reent*, const void*, int (*)(void*, char*, int), int (*)(void*, const char*, int), fpos_t (*)(void*, fpos_t, int), int (*)(void*)"
Function,-,_fwalk_sglue,int,"_reent*, int (*)(_reent*, __FILE*), _glue*"
Function,-,_fwrite_r,size_t,"_reent*, const void*, size_t, size_t, FILE*"
Function,-,_fwrite_unlocked_r,size_t,"_reent*, const void*, size_t, size_t, FILE*"
Function,-,_getc_r,int,"_reent*, FILE*"
@@ -2767,7 +2770,6 @@ Function,+,protocol_dict_get_write_data,_Bool,"ProtocolDict*, size_t, void*"
Function,+,protocol_dict_render_brief_data,void,"ProtocolDict*, FuriString*, size_t"
Function,+,protocol_dict_render_data,void,"ProtocolDict*, FuriString*, size_t"
Function,+,protocol_dict_set_data,void,"ProtocolDict*, size_t, const uint8_t*, size_t"
Function,-,pselect,int,"int, fd_set*, fd_set*, fd_set*, const timespec*, const sigset_t*"
Function,-,pulse_reader_alloc,PulseReader*,"const GpioPin*, uint32_t"
Function,-,pulse_reader_free,void,PulseReader*
Function,-,pulse_reader_receive,uint32_t,"PulseReader*, int"
@@ -2876,7 +2878,6 @@ Function,+,scene_manager_stop,void,SceneManager*
Function,+,sd_api_get_fs_type_text,const char*,SDFsType
Function,-,secure_getenv,char*,const char*
Function,-,seed48,unsigned short*,unsigned short[3]
Function,-,select,int,"int, fd_set*, fd_set*, fd_set*, timeval*"
Function,-,serial_svc_is_started,_Bool,
Function,-,serial_svc_notify_buffer_is_empty,void,
Function,-,serial_svc_set_callbacks,void,"uint16_t, SerialServiceEventCallback, void*"
@@ -3796,8 +3797,13 @@ Variable,+,I_volup_hover_24x21,Icon,
Variable,-,MSIRangeTable,const uint32_t[16],
Variable,-,SmpsPrescalerTable,const uint32_t[4][6],
Variable,+,SystemCoreClock,uint32_t,
Variable,-,__atexit,_atexit*,
Variable,-,__atexit0,_atexit,
Variable,-,__sf,__FILE[3],
Variable,-,__sglue,_glue,
Variable,-,__stdio_exit_handler,void (*)(),
Variable,+,_ctype_,const char[],
Variable,+,_global_impure_ptr,_reent*,
Variable,+,_impure_data,_reent,
Variable,+,_impure_ptr,_reent*,
Variable,-,_sys_errlist,const char*[],
Variable,-,_sys_nerr,int,
1 entry status name type params
2 Version + 54.1 55.1
3 Header + applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h
4 Header + applications/main/archive/helpers/archive_helpers_ext.h
5 Header + applications/main/subghz/subghz_fap.h
254 Header + targets/f7/furi_hal/furi_hal_subghz.h
255 Header + targets/f7/furi_hal/furi_hal_target_hw.h
256 Header + targets/f7/furi_hal/furi_hal_usb_cdc.h
257 Header + targets/f7/platform_specific/cxx_virtual_stub.h
258 Header + targets/f7/platform_specific/intrinsic_export.h
259 Header + targets/f7/platform_specific/math_wrapper.h
260 Header + targets/furi_hal_include/furi_hal.h
395 Function - __assert void const char*, int, const char*
396 Function + __assert_func void const char*, int, const char*, const char*
397 Function + __clear_cache void void*, void*
398 Function + __cxa_pure_virtual void
399 Function - __eprintf void const char*, const char*, unsigned int, const char*
400 Function + __errno int*
401 Function - __fpclassifyd int double
483 Function - _ftell_r long _reent*, FILE*
484 Function - _ftello_r _off_t _reent*, FILE*
485 Function - _funopen_r FILE* _reent*, const void*, int (*)(void*, char*, int), int (*)(void*, const char*, int), fpos_t (*)(void*, fpos_t, int), int (*)(void*)
486 Function - _fwalk_sglue int _reent*, int (*)(_reent*, __FILE*), _glue*
487 Function - _fwrite_r size_t _reent*, const void*, size_t, size_t, FILE*
488 Function - _fwrite_unlocked_r size_t _reent*, const void*, size_t, size_t, FILE*
489 Function - _getc_r int _reent*, FILE*
2770 Function + protocol_dict_render_brief_data void ProtocolDict*, FuriString*, size_t
2771 Function + protocol_dict_render_data void ProtocolDict*, FuriString*, size_t
2772 Function + protocol_dict_set_data void ProtocolDict*, size_t, const uint8_t*, size_t
Function - pselect int int, fd_set*, fd_set*, fd_set*, const timespec*, const sigset_t*
2773 Function - pulse_reader_alloc PulseReader* const GpioPin*, uint32_t
2774 Function - pulse_reader_free void PulseReader*
2775 Function - pulse_reader_receive uint32_t PulseReader*, int
2878 Function + sd_api_get_fs_type_text const char* SDFsType
2879 Function - secure_getenv char* const char*
2880 Function - seed48 unsigned short* unsigned short[3]
Function - select int int, fd_set*, fd_set*, fd_set*, timeval*
2881 Function - serial_svc_is_started _Bool
2882 Function - serial_svc_notify_buffer_is_empty void
2883 Function - serial_svc_set_callbacks void uint16_t, SerialServiceEventCallback, void*
3797 Variable - MSIRangeTable const uint32_t[16]
3798 Variable - SmpsPrescalerTable const uint32_t[4][6]
3799 Variable + SystemCoreClock uint32_t
3800 Variable - __atexit _atexit*
3801 Variable - __atexit0 _atexit
3802 Variable - __sf __FILE[3]
3803 Variable - __sglue _glue
3804 Variable - __stdio_exit_handler void (*)()
3805 Variable + _ctype_ const char[]
3806 Variable + _global_impure_ptr _impure_data _reent* _reent
3807 Variable + _impure_ptr _reent*
3808 Variable - _sys_errlist const char*[]
3809 Variable - _sys_nerr int
+1 -1
View File
@@ -11,7 +11,7 @@
#define FAST_ADV_TIMEOUT 30000
#define INITIAL_ADV_TIMEOUT 60000
#define GAP_INTERVAL_TO_MS(x) (uint16_t)((x)*1.25)
#define GAP_INTERVAL_TO_MS(x) (uint16_t)((x) * 1.25)
typedef struct {
uint16_t gap_svc_handle;
+1 -1
View File
@@ -43,7 +43,7 @@
*/
#define FURI_HAL_FLASH_C2_LOCK_TIMEOUT_MS (3000U) /* 3 seconds */
#define IS_ADDR_ALIGNED_64BITS(__VALUE__) (((__VALUE__)&0x7U) == (0x00UL))
#define IS_ADDR_ALIGNED_64BITS(__VALUE__) (((__VALUE__) & 0x7U) == (0x00UL))
#define IS_FLASH_PROGRAM_ADDRESS(__VALUE__) \
(((__VALUE__) >= FLASH_BASE) && ((__VALUE__) <= (FLASH_BASE + FLASH_SIZE - 8UL)) && \
(((__VALUE__) % 8UL) == 0UL))
+2 -2
View File
@@ -46,8 +46,8 @@ void furi_hal_memory_init() {
}
uint32_t sram2a_busy_size = (uint32_t)&__sram2a_free__ - (uint32_t)&__sram2a_start__;
uint32_t sram2a_unprotected_size = (sbrsa)*1024;
uint32_t sram2b_unprotected_size = (snbrsa)*1024;
uint32_t sram2a_unprotected_size = (sbrsa) * 1024;
uint32_t sram2b_unprotected_size = (snbrsa) * 1024;
memory->region[SRAM_A].start = (uint8_t*)&__sram2a_free__;
memory->region[SRAM_B].start = (uint8_t*)&__sram2b_start__;
+2 -2
View File
@@ -17,8 +17,8 @@
#define FURI_HAL_IDLE_TIMER_CLK_HZ 32768
#define FURI_HAL_OS_TICK_HZ configTICK_RATE_HZ
#define FURI_HAL_OS_IDLE_CNT_TO_TICKS(x) (((x)*FURI_HAL_OS_TICK_HZ) / FURI_HAL_IDLE_TIMER_CLK_HZ)
#define FURI_HAL_OS_TICKS_TO_IDLE_CNT(x) (((x)*FURI_HAL_IDLE_TIMER_CLK_HZ) / FURI_HAL_OS_TICK_HZ)
#define FURI_HAL_OS_IDLE_CNT_TO_TICKS(x) (((x) * FURI_HAL_OS_TICK_HZ) / FURI_HAL_IDLE_TIMER_CLK_HZ)
#define FURI_HAL_OS_TICKS_TO_IDLE_CNT(x) (((x) * FURI_HAL_IDLE_TIMER_CLK_HZ) / FURI_HAL_OS_TICK_HZ)
#define FURI_HAL_IDLE_TIMER_TICK_PER_EPOCH (FURI_HAL_OS_IDLE_CNT_TO_TICKS(FURI_HAL_IDLE_TIMER_MAX))
#define FURI_HAL_OS_MAX_SLEEP (FURI_HAL_IDLE_TIMER_TICK_PER_EPOCH - 1)
@@ -0,0 +1,6 @@
#include "cxx_virtual_stub.h"
#include <furi.h>
void __cxa_pure_virtual() {
furi_crash("C++ pure virtual call");
}
@@ -0,0 +1,13 @@
#pragma once
#include <errno.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
void __cxa_pure_virtual();
#ifdef __cplusplus
}
#endif